Package | Description |
---|---|
reactor.bus |
Hold the required abstraction to enable Event Driven Programming with Reactor.
|
reactor.bus.publisher | |
reactor.bus.registry |
Registries provide a common way to retrieve items registered using a
Selector . |
reactor.bus.selector |
Selectors provide a way to register components to react to given key data. |
reactor.groovy.config | |
reactor.groovy.ext | |
reactor.io.net.http |
Components for writing HTTP-based clients and servers using Reactor abstractions.
|
Modifier and Type | Method and Description |
---|---|
org.reactivestreams.Publisher<? extends Event<?>> |
EventBus.on(Selector broadcastSelector)
|
<T extends Event<?>> |
EventBus.on(Selector selector,
Consumer<T> consumer) |
<V extends T> |
Bus.on(Selector selector,
Consumer<V> consumer)
|
<T extends Event<?>,V> |
EventBus.receive(Selector sel,
Function<T,V> fn)
|
Constructor and Description |
---|
BusPublisher(Bus<T> observable,
Selector selector) |
Modifier and Type | Method and Description |
---|---|
Selector<K> |
Registration.getSelector()
The
Selector that was used when the registration was made. |
Selector<K> |
CachableRegistration.getSelector() |
Modifier and Type | Method and Description |
---|---|
Registration<K,V> |
CachingRegistry.register(Selector<K> sel,
V obj) |
Registration<K,V> |
Registry.register(Selector<K> sel,
V obj)
Assign the given
Selector with the given object. |
Registration<K,V> |
SimpleCachingRegistry.register(Selector<K> sel,
V obj) |
Constructor and Description |
---|
CachableRegistration(Selector<K> selector,
V object,
Runnable onCancel) |
Modifier and Type | Class and Description |
---|---|
class |
ClassSelector
Implementation of
Selector that uses Class.isAssignableFrom(Class) to determine a match. |
class |
JsonPathSelector |
class |
MatchAllSelector
Implementation of
Selector that matches
all objects. |
class |
ObjectSelector<K,T>
Selector implementation that uses the Object.hashCode() and Object.equals(Object)
methods of the internal object to determine a match. |
class |
PredicateSelector
|
class |
RegexSelector
A
Selector implementation based on the given regular expression. |
class |
SetMembershipSelector
Implementation of
Selector that matches
objects on set membership. |
class |
UriPathSelector
A
Selector implementation based on a UriPathTemplate . |
class |
UriSelector
A
Selector implementation that matches on various components of a full URI. |
Modifier and Type | Method and Description |
---|---|
static Selector |
Selectors.$()
A short-hand alias for
Selectors.anonymous() . |
static Selector |
Selectors.$(String fmt,
Object... args)
Creates a
Selector based on the given string format and arguments. |
static <T> Selector<T> |
Selectors.$(T obj)
A short-hand alias for
Selectors.object(T) . |
static Selector |
Selectors.anonymous()
Creates an anonymous
Selector . |
static Selector |
JsonPathSelector.J(String jsonPath,
com.jayway.jsonpath.Filter... filters) |
static Selector |
JsonPathSelector.jsonPathSelector(String jsonPath,
com.jayway.jsonpath.Filter... filters) |
static Selector |
Selectors.matchAll()
Creates a
Selector that matches
all objects. |
static <T> Selector<T> |
Selectors.object(T obj)
Creates a
Selector based on the given object. |
static <T> Selector<T> |
ObjectSelector.objectSelector(T obj)
Helper method to create a
Selector from the given object. |
static Selector |
Selectors.predicate(Predicate<Object> predicate)
|
static Selector |
Selectors.R(String regex)
A short-hand alias for
Selectors.regex(String) . |
static Selector |
Selectors.regex(String regex)
Creates a
Selector based on the given regular expression. |
static Selector |
RegexSelector.regexSelector(String regex)
Creates a
Selector based on the given regular expression. |
static Selector |
Selectors.setMembership(Set set)
Creates a
Selector that matches
objects on set membership. |
static Selector |
ClassSelector.typeSelector(Class<?> supertype)
Creates a
ClassSelector based on the given class type that only matches if the
key being matched is assignable according to Class.isAssignableFrom(Class) . |
static Selector |
Selectors.U(String uri)
A short-hand alias for
Selectors.uri(String) . |
static Selector |
Selectors.uri(String uri)
Creates a
Selector based on a URI template. |
static Selector |
UriPathSelector.uriPathSelector(String uriTemplate)
Creates a
Selector based on a URI template. |
Modifier and Type | Method and Description |
---|---|
Selector |
ReactorBuilder.SelectorProcessor.getSelector() |
Modifier and Type | Method and Description |
---|---|
ReactorBuilder |
ReactorBuilder.on(Selector selector,
groovy.lang.Closure closure) |
ReactorBuilder |
ReactorBuilder.on(Selector selector,
Consumer closure) |
void |
ReactorBuilder.processor(Selector selector,
org.reactivestreams.Processor<?,Event> _processor) |
void |
ReactorBuilder.stream(Selector selector,
groovy.lang.Closure<Action<Event<?>,Event<?>>> closure) |
Constructor and Description |
---|
SelectorProcessor(org.reactivestreams.Processor<Event<?>,Event<?>> processor,
Selector selector) |
Modifier and Type | Method and Description |
---|---|
static <K,T> Registration<K,Consumer<T>> |
BusExtensions.react(EventBus selfType,
Selector<K> selector,
groovy.lang.Closure handler) |
Modifier and Type | Class and Description |
---|---|
class |
HttpSelector
A Selector to match against ServerRequest
|
Modifier and Type | Method and Description |
---|---|
HttpServer<IN,OUT> |
HttpServer.route(Selector<HttpChannel> condition,
ReactorChannelHandler<IN,OUT,HttpChannel<IN,OUT>> serviceFunction)
Register an handler for the given Selector condition, incoming connections will query the internal registry
to invoke the matching handlers.
|
Copyright © 2016. All rights reserved.