Search in sources :

Example 1 with EventParams

use of com.ecwid.consul.v1.event.model.EventParams in project spring-cloud-consul by spring-cloud.

the class ConsulSendingHandler method handleMessageInternal.

@Override
protected void handleMessageInternal(Message<?> message) {
    if (this.logger.isTraceEnabled()) {
        this.logger.trace("Publishing message" + message);
    }
    Object payload = message.getPayload();
    if (payload instanceof byte[]) {
        payload = Arrays.toString((byte[]) payload);
    }
    // TODO: support headers
    // TODO: support consul event filters: NodeFilter, ServiceFilter, TagFilter
    Response<Event> event = this.consul.eventFire(this.eventName, (String) payload, new EventParams(), QueryParams.DEFAULT);
// TODO: return event?
}
Also used : EventParams(com.ecwid.consul.v1.event.model.EventParams) Event(com.ecwid.consul.v1.event.model.Event)

Aggregations

Event (com.ecwid.consul.v1.event.model.Event)1 EventParams (com.ecwid.consul.v1.event.model.EventParams)1