SPEC - The DispatcherComponentSpec subclassTARGET - The type that this spec will createpublic abstract class DispatcherComponentSpec<SPEC extends DispatcherComponentSpec<SPEC,TARGET>,TARGET>
extends java.lang.Object
implements reactor.fn.Supplier<TARGET>
Environment and Dispatcher.| Constructor and Description |
|---|
DispatcherComponentSpec() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract TARGET |
configure(reactor.core.Dispatcher dispatcher,
reactor.Environment environment) |
SPEC |
defaultDispatcher()
Configures the component to use the configured Environment's default dispatcher
|
SPEC |
dispatcher(reactor.core.Dispatcher dispatcher)
Configures the component to use the given
dispatcher |
SPEC |
dispatcher(java.lang.String dispatcherName)
Configures the component to the dispatcher in the configured Environment with the given
dispatcherName |
SPEC |
env(reactor.Environment env)
Configures the spec, and potentially the component being configured, to use the given
environment
|
TARGET |
get() |
SPEC |
synchronousDispatcher()
Configures the component to use a synchronous dispatcher
|
public final SPEC env(reactor.Environment env)
env - The environment to usethispublic final SPEC defaultDispatcher()
thisjava.lang.IllegalStateException - if no Environment has been configuredEnvironment.getDefaultDispatcher(),
env(Environment)public final SPEC synchronousDispatcher()
thispublic final SPEC dispatcher(reactor.core.Dispatcher dispatcher)
dispatcherdispatcher - The dispatcher to usethispublic final SPEC dispatcher(java.lang.String dispatcherName)
dispatcherNamedispatcherName - The name of the dispatcherthisjava.lang.IllegalStateException - if no Environment has been configuredEnvironment.getDispatcher(String),
env(Environment)protected abstract TARGET configure(reactor.core.Dispatcher dispatcher, reactor.Environment environment)