Package | Description |
---|---|
reactor.alloc |
Pooling provides lower GC requirements by re-using components.
|
reactor.bus |
Hold the required abstraction to enable Event Driven Programming with Reactor.
|
reactor.bus.routing | |
reactor.bus.spec |
Specs help create
Reactors by providing a fluent API to specify
common options. |
reactor.bus.support | |
reactor.groovy.config | |
reactor.groovy.ext | |
reactor.groovy.support |
Modifier and Type | Method and Description |
---|---|
Event<T> |
EventFactorySupplier.get() |
Modifier and Type | Method and Description |
---|---|
<T> Reference<Event<T>> |
EventAllocator.get(Class<T> klass)
Allocate an object from the internal pool, based on the type of Event.
|
protected abstract <T> Allocator<Event<T>> |
EventAllocator.makeAllocator(Class<T> klass)
Make a new allocator for
Event s with generic type of |
Modifier and Type | Class and Description |
---|---|
class |
EventBus.ReplyToConsumer<E extends Event<?>,V> |
Modifier and Type | Class and Description |
---|---|
static class |
EventBus.ReplyToEvent<T> |
Modifier and Type | Method and Description |
---|---|
<T extends Event<?>> |
EventBus.on(Selector selector,
Consumer<T> consumer) |
<T extends Event<?>,V> |
EventBus.receive(Selector sel,
Function<T,V> fn)
|
<T extends Event<?>> |
EventBus.sendAndReceive(Object key,
Event<?> event,
Consumer<T> reply)
|
<T extends Event<?>> |
EventBus.sendAndReceive(Object key,
Supplier<? extends Event<?>> supplier,
Consumer<T> reply)
|
Modifier and Type | Method and Description |
---|---|
Event<T> |
Event.copy()
Create a copy of this event, reusing same headers, data and replyTo
|
<E> Event<E> |
Event.copy(E data)
Create a copy of this event, reusing same headers and replyTo
|
<X> Event<X> |
EventBus.ReplyToEvent.copy(X data) |
Event<T> |
Event.setData(T data)
Set the internal data to wrap.
|
Event<T> |
Event.setKey(Object key)
Set the key this event is being notified with.
|
Event<T> |
Event.setReplyTo(Object replyTo)
Set the
key that interested parties should send replies to. |
static <T> Event<T> |
Event.wrap(T obj)
Wrap the given object with an
Event . |
static <T> Event<T> |
Event.wrap(T obj,
Object replyToKey)
|
Modifier and Type | Method and Description |
---|---|
Registry<Object,Consumer<? extends Event<?>>> |
EventBus.getConsumerRegistry()
|
org.reactivestreams.Publisher<? extends Event<?>> |
EventBus.on(Selector broadcastSelector)
|
<T extends Event<?>> |
EventBus.on(Selector selector,
Consumer<T> consumer) |
<T> Consumer<Event<T>> |
EventBus.prepare(Object key)
Create an optimized path for publishing notifications to the given key.
|
<T extends Event<?>,V> |
EventBus.receive(Selector sel,
Function<T,V> fn)
|
Modifier and Type | Method and Description |
---|---|
void |
EventBus.accept(Event<?> event) |
EventBus |
EventBus.notify(Object key,
Event<?> ev) |
void |
Event.override(Event<T> ev) |
EventBus |
EventBus.send(Object key,
Event<?> ev)
|
EventBus |
EventBus.send(Object key,
Event<?> ev,
Bus replyTo)
|
<T extends Event<?>> |
EventBus.sendAndReceive(Object key,
Event<?> event,
Consumer<T> reply)
|
Modifier and Type | Method and Description |
---|---|
EventBus |
EventBus.notify(Object key,
Supplier<? extends Event<?>> supplier)
Notify this component that the given
Supplier can provide an event that's ready to be
processed. |
EventBus |
EventBus.send(Object key,
Supplier<? extends Event<?>> supplier)
|
EventBus |
EventBus.send(Object key,
Supplier<? extends Event<?>> supplier,
Bus replyTo)
|
<T extends Event<?>> |
EventBus.sendAndReceive(Object key,
Supplier<? extends Event<?>> supplier,
Consumer<T> reply)
|
Constructor and Description |
---|
EventBus(Registry<Object,Consumer<? extends Event<?>>> consumerRegistry,
Dispatcher dispatcher,
Router router,
Consumer<Throwable> dispatchErrorHandler,
Consumer<Throwable> uncaughtErrorHandler)
Create a new Reactor that uses the given
dispatacher and eventRouter . |
Modifier and Type | Method and Description |
---|---|
<E extends Event<?>> |
ConsumerFilteringRouter.route(Object key,
E event,
List<Registration<Object,? extends Consumer<? extends Event<?>>>> consumers,
Consumer<E> completionConsumer,
Consumer<Throwable> errorConsumer) |
<E extends Event<?>> |
Router.route(Object key,
E data,
List<Registration<Object,? extends Consumer<? extends Event<?>>>> consumers,
Consumer<E> completionConsumer,
Consumer<Throwable> errorConsumer)
Routes the
event , triggered by a notification with the given key to the
consumers . |
<E extends Event<?>> |
TraceableDelegatingRouter.route(Object key,
E event,
List<Registration<Object,? extends Consumer<? extends Event<?>>>> consumers,
Consumer<E> completionConsumer,
Consumer<Throwable> errorConsumer) |
Modifier and Type | Method and Description |
---|---|
<E extends Event<?>> |
ConsumerFilteringRouter.route(Object key,
E event,
List<Registration<Object,? extends Consumer<? extends Event<?>>>> consumers,
Consumer<E> completionConsumer,
Consumer<Throwable> errorConsumer) |
<E extends Event<?>> |
Router.route(Object key,
E data,
List<Registration<Object,? extends Consumer<? extends Event<?>>>> consumers,
Consumer<E> completionConsumer,
Consumer<Throwable> errorConsumer)
Routes the
event , triggered by a notification with the given key to the
consumers . |
<E extends Event<?>> |
TraceableDelegatingRouter.route(Object key,
E event,
List<Registration<Object,? extends Consumer<? extends Event<?>>>> consumers,
Consumer<E> completionConsumer,
Consumer<Throwable> errorConsumer) |
Modifier and Type | Method and Description |
---|---|
SPEC |
EventRoutingComponentSpec.consumerRegistry(Registry<Object,Consumer<? extends Event<?>>> consumerRegistry)
Configures the
Registry to use when creating this component. |
Modifier and Type | Class and Description |
---|---|
class |
CallbackEvent<T>
|
Modifier and Type | Method and Description |
---|---|
<X> Event<X> |
CallbackEvent.copy(X data) |
Modifier and Type | Method and Description |
---|---|
void |
EventConsumer.accept(Event<T> ev) |
Modifier and Type | Method and Description |
---|---|
<E extends Event<?>> |
StreamRouter.route(Object key,
E event,
List<Registration<Object,? extends Consumer<? extends Event<?>>>> consumers,
Consumer<E> completionConsumer,
Consumer<Throwable> errorConsumer) |
Modifier and Type | Method and Description |
---|---|
org.reactivestreams.Processor<Event<?>,Event<?>> |
ReactorBuilder.SelectorProcessor.getProcessor() |
org.reactivestreams.Processor<Event<?>,Event<?>> |
ReactorBuilder.SelectorProcessor.getProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
ReactorBuilder.processor(Selector selector,
org.reactivestreams.Processor<?,Event> _processor) |
void |
ReactorBuilder.processor(String selector,
org.reactivestreams.Processor<?,Event> _processor) |
<E extends Event<?>> |
StreamRouter.route(Object key,
E event,
List<Registration<Object,? extends Consumer<? extends Event<?>>>> consumers,
Consumer<E> completionConsumer,
Consumer<Throwable> errorConsumer) |
void |
ReactorBuilder.stream(groovy.lang.Closure<Action<Event<?>,Event<?>>> closure) |
void |
ReactorBuilder.stream(groovy.lang.Closure<Action<Event<?>,Event<?>>> closure) |
void |
ReactorBuilder.stream(Selector selector,
groovy.lang.Closure<Action<Event<?>,Event<?>>> closure) |
void |
ReactorBuilder.stream(Selector selector,
groovy.lang.Closure<Action<Event<?>,Event<?>>> closure) |
void |
ReactorBuilder.stream(String selector,
groovy.lang.Closure<Action<Event<?>,Event<?>>> closure) |
void |
ReactorBuilder.stream(String selector,
groovy.lang.Closure<Action<Event<?>,Event<?>>> closure) |
Constructor and Description |
---|
SelectorProcessor(org.reactivestreams.Processor<Event<?>,Event<?>> processor,
Selector selector) |
SelectorProcessor(org.reactivestreams.Processor<Event<?>,Event<?>> processor,
Selector selector) |
StreamRouter(Filter filter,
Registry<Object,org.reactivestreams.Processor<Event<?>,Event<?>>> processorRegistry) |
StreamRouter(Filter filter,
Registry<Object,org.reactivestreams.Processor<Event<?>,Event<?>>> processorRegistry) |
Modifier and Type | Method and Description |
---|---|
static <T> EventBus |
BusExtensions.send(EventBus selfType,
Object key,
Event<T> obj,
groovy.lang.Closure handler) |
Modifier and Type | Method and Description |
---|---|
static <T> Bus |
BusExtensions.notify(Bus selfType,
Object key,
Supplier<Event<T>> obj) |
Modifier and Type | Method and Description |
---|---|
void |
ClosureEventConsumer.accept(Event<T> arg) |
V |
ClosureEventFunction.apply(Event<K> arg) |
Copyright © 2016. All rights reserved.