本文整理汇总了Java中com.ecwid.consul.v1.event.model.EventParams类的典型用法代码示例。如果您正苦于以下问题:Java EventParams类的具体用法?Java EventParams怎么用?Java EventParams使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EventParams类属于com.ecwid.consul.v1.event.model包,在下文中一共展示了EventParams类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: eventFire
import com.ecwid.consul.v1.event.model.EventParams; //导入依赖的package包/类
@Override
public Response<Event> eventFire(String event, String payload, EventParams eventParams, QueryParams queryParams) {
RawResponse rawResponse = rawClient.makePutRequest("/v1/event/fire/" + event, payload, eventParams, queryParams);
if (rawResponse.getStatusCode() == 200) {
Event value = GsonFactory.getGson().fromJson(rawResponse.getContent(), Event.class);
return new Response<Event>(value, rawResponse);
} else {
throw new OperationException(rawResponse);
}
}
示例2: handleMessageInternal
import com.ecwid.consul.v1.event.model.EventParams; //导入依赖的package包/类
@Override
protected void handleMessageInternal(Message<?> message) throws Exception {
if (logger.isTraceEnabled()) {
logger.trace("Publishing message" + message);
}
Object payload = message.getPayload();
// TODO: support headers
// TODO: support consul event filters: NodeFilter, ServiceFilter, TagFilter
Response<Event> event = consul.eventFire(this.eventName, (String) payload,
new EventParams(), QueryParams.DEFAULT);
// TODO: return event?
// return null;
}
示例3: eventFire
import com.ecwid.consul.v1.event.model.EventParams; //导入依赖的package包/类
@Override
public Response<Event> eventFire(String event, String payload,
EventParams eventParams, QueryParams queryParams) {
return wrapped.eventFire(event, payload, eventParams, queryParams);
}
示例4: eventFire
import com.ecwid.consul.v1.event.model.EventParams; //导入依赖的package包/类
@Override
public Response<Event> eventFire(String event, String payload, EventParams eventParams, QueryParams queryParams) {
return eventClient.eventFire(event, payload, eventParams, queryParams);
}
示例5: fire
import com.ecwid.consul.v1.event.model.EventParams; //导入依赖的package包/类
public Event fire(String name, String payload) {
Response<Event> response = consul.eventFire(name, payload, new EventParams(),
QueryParams.DEFAULT);
return response.getValue();
}
示例6: eventFire
import com.ecwid.consul.v1.event.model.EventParams; //导入依赖的package包/类
public Response<Event> eventFire(String event, String payload, EventParams eventParams, QueryParams queryParams);