A trait that can be applied to any class to enable event sending and receiving
Type | Name and description |
---|---|
reactor.bus.EventBus |
eventBus |
Type Params | Return Type | Name and description |
---|---|---|
|
boolean |
clearEventConsumers(java.lang.Object key) Clears event consumers for the given key |
<T> |
reactor.bus.Event<T> |
eventFor(T data) Creates an reactor.bus.Event for the given data |
<T> |
reactor.bus.Event<T> |
eventFor(java.util.Map<java.lang.String, java.lang.Object> headers, T data) Creates an reactor.bus.Event for the given headers and data |
<T> |
reactor.bus.Event<T> |
eventFor(java.util.Map<java.lang.String, java.lang.Object> headers, T data, groovy.lang.Closure<java.lang.Throwable> errorConsumer) Creates an reactor.bus.Event for the given headers, data and error consumer |
|
reactor.bus.Bus |
notify(java.lang.Object key, reactor.bus.Event<?> ev) @see reactor.bus.Bus#notify(java.lang.Object, java.lang.Object) |
|
reactor.bus.Bus |
notify(java.lang.Object key, java.lang.Object data) @see reactor.bus.Bus#notify(java.lang.Object, reactor.bus.Event) |
<E extends Event<?>> |
reactor.bus.Bus |
notify(java.lang.Object key, groovy.lang.Closure<E> supplier) @see reactor.bus.Bus#notify(java.lang.Object, reactor.bus.Event) |
<E extends Event<?>> |
reactor.bus.registry.Registration<java.lang.Object, reactor.fn.Consumer<E>> |
on(java.lang.Class key, groovy.lang.Closure consumer) @see #on(reactor.bus.selector.Selector, reactor.fn.Consumer) |
<E extends Event<?>> |
reactor.bus.registry.Registration<java.lang.Object, reactor.fn.Consumer<E>> |
on(reactor.bus.selector.Selector key, groovy.lang.Closure consumer) @see #on(reactor.bus.selector.Selector, reactor.fn.Consumer) |
<E extends Event<?>> |
reactor.bus.registry.Registration<java.lang.Object, reactor.fn.Consumer<E>> |
on(java.lang.Object key, groovy.lang.Closure consumer) @see #on(reactor.bus.selector.Selector, reactor.fn.Consumer) |
<E extends Event<?>> |
reactor.bus.registry.Registration<java.lang.Object, reactor.fn.Consumer<E>> |
on(java.lang.Object key, reactor.fn.Consumer<E> consumer) @see #on(reactor.bus.selector.Selector, reactor.fn.Consumer) |
<E extends Event<?>> |
reactor.bus.registry.Registration<java.lang.Object, reactor.fn.Consumer<E>> |
on(java.lang.Class type, reactor.fn.Consumer<E> consumer) @see #on(reactor.bus.selector.Selector, reactor.fn.Consumer) |
<E extends Event<?>> |
reactor.bus.registry.Registration<java.lang.Object, reactor.fn.Consumer<E>> |
on(reactor.bus.selector.Selector sel, reactor.fn.Consumer<E> consumer) Register a reactor.fn.Consumer to be triggered when a notification matches the given reactor.bus.selector.Selector. |
|
reactor.bus.Bus |
sendAndReceive(java.lang.Object key, java.lang.Object data, groovy.lang.Closure reply) @see EventBus#sendAndReceive(java.lang.Object, reactor.bus.Event, reactor.fn.Consumer) |
<E extends Event<?>> |
reactor.bus.Bus |
sendAndReceive(java.lang.Object key, groovy.lang.Closure<E> supplier, groovy.lang.Closure reply) @see EventBus#sendAndReceive(java.lang.Object, reactor.fn.Supplier, reactor.fn.Consumer) |
Clears event consumers for the given key
key
- The keyCreates an reactor.bus.Event for the given data
data
- The dataCreates an reactor.bus.Event for the given headers and data
headers
- The headersdata
- The dataCreates an reactor.bus.Event for the given headers, data and error consumer
headers
- The headersdata
- The dataerrorConsumer
- The errors consumer
Register a reactor.fn.Consumer to be triggered when a notification matches the given reactor.bus.selector.Selector.
sel
- The Selector to be used for matchingconsumer
- The Consumer to be triggered
- The type of the reactor.bus.Event