T - the type of the event payloadpublic class CallbackEvent<T> extends Event<T>
Event implementation that attaches a callback to an Event and
passes it to a delegate Consumer.Event.Headers| Constructor and Description |
|---|
CallbackEvent(Event.Headers headers,
T data,
reactor.fn.Consumer callback) |
CallbackEvent(Event.Headers headers,
T data,
reactor.fn.Consumer callback,
reactor.fn.Consumer<java.lang.Throwable> throwableConsumer) |
CallbackEvent(T data,
reactor.fn.Consumer callback) |
| Modifier and Type | Method and Description |
|---|---|
void |
callback()
Trigger callback with current payload
|
<X> Event<X> |
copy(X data)
Create a copy of this event, reusing same headers and replyTo
|
consumeError, copy, getData, getErrorConsumer, getHeaders, getId, getKey, getReplyTo, override, recycle, setData, setKey, setReplyTo, toString, wrap, wrappublic CallbackEvent(T data, reactor.fn.Consumer callback)
public CallbackEvent(Event.Headers headers, T data, reactor.fn.Consumer callback)
public CallbackEvent(Event.Headers headers, T data, reactor.fn.Consumer callback, reactor.fn.Consumer<java.lang.Throwable> throwableConsumer)