io.cattle.platform.eventing.model.Event.getReplyTo()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(117)

本文整理了Java中io.cattle.platform.eventing.model.Event.getReplyTo()方法的一些代码示例,展示了Event.getReplyTo()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.getReplyTo()方法的具体详情如下:
包路径:io.cattle.platform.eventing.model.Event
类名称:Event
方法名:getReplyTo

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;
}

相关文章