本文整理了Java中io.cattle.platform.eventing.model.Event.getReplyTo()
方法的一些代码示例,展示了Event.getReplyTo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.getReplyTo()
方法的具体详情如下:
包路径:io.cattle.platform.eventing.model.Event
类名称:Event
方法名:getReplyTo
暂无
代码示例来源:origin: rancher/cattle
public EventVO(Event event) {
this(event, event.getReplyTo());
}
代码示例来源:origin: rancher/cattle
@SuppressWarnings("unchecked")
@Override
public <T> T convert(Event resultEvent, Class<T> reply) {
Object payload = resultEvent;
if (delegate) {
payload = resultEvent.getData();
}
return (T) new EventVO<>().withName(request.getReplyTo()).withData(payload);
}
});
代码示例来源:origin: rancher/cattle
public static EventVO<Object> reply(Event request) {
String[] previousIds = request.getPreviousIds();
if (previousIds != null && previousIds.length > 0) {
String[] newIds = new String[previousIds.length + 1];
System.arraycopy(previousIds, 0, newIds, 1, previousIds.length);
newIds[0] = request.getId();
previousIds = newIds;
} else {
previousIds = new String[] { request.getId() };
}
EventVO<Object> event = new EventVO<Object>();
event.setName(request.getReplyTo());
event.setPreviousNames(prepend(request.getPreviousNames(), request.getName()));
event.setPreviousIds(prepend(request.getPreviousIds(), request.getId()));
event.setResourceId(request.getResourceId());
event.setResourceType(request.getResourceType());
return event;
}
内容来源于网络,如有侵权,请联系作者删除!