public interface EventProviderConfigurator
configuring EventProvider instances.
Fluent API means, that the methods of this interface and the way in
which their results can be chained together, form a kind of DSL (Domain
Specific Language). The entry point for the fluent API is the
EventProvider.configure() method, which returns an implementation of
this interface.
Note: This interface and any of its nested interfaces, are not
intended to be implemented by clients. Instead, when you want to incorporate
the fluent builder API for your own EventProvider implementation, implement
CustomConfigurator and pass an instance to
EventProviderConfigurator.ProviderChooser.useCustomProvider(CustomConfigurator):
... = EventProvider.configure()
.defaultStore().with()
.customProvider(myCustomConfigurator)
.myFluentAPIMethod();
| Modifier and Type | Interface and Description |
|---|---|
static interface |
EventProviderConfigurator.AsyncProviderConfigurator<S extends ListenerStore,E extends EventProvider<S>>
Provides configuration for EventProviders which use an
ExecutorService for dispatching Events using multi threading. |
static interface |
EventProviderConfigurator.Chainable<C,E>
Allows chaining of fluent API objects using the word 'and' and provides
methods to obtain the configured
EventProvider. |
static interface |
EventProviderConfigurator.Final<E>
Provides methods to obtain the configured
EventProvider. |
static interface |
EventProviderConfigurator.ProviderChooser<S extends ListenerStore>
Configures the type of EventProvider to use on the previously chosen
ListenerStore.
|
static interface |
EventProviderConfigurator.ProviderConfigurator<S extends ListenerStore,E extends EventProvider<S>>
Provides configuration mostly for non-threaded EventProviders.
|
| Modifier and Type | Method and Description |
|---|---|
static EventProviderConfigurator |
create()
Creates a new configurator instance.
|
SequentialEventProvider<DefaultListenerStore> |
createInstantly()
Create a synchronous EventProvider with a
DefaultListenerStore
without options to further configure it. |
EventProviderConfigurator.ProviderChooser<DefaultListenerStore> |
defaultStore()
Chooses a
DefaultListenerStore to manage Listeners for the EventProvider instance to be created. |
<S extends ListenerStore> |
store(S store)
Chooses the provided
store to manage Listeners
for the EventProvider instance to be created. |
<S extends ListenerStore> |
store(Supplier<S> storeSupplier)
Use the provided supplier to lazily create the
ListenerStore to
use. |
static EventProviderConfigurator create()
SequentialEventProvider<DefaultListenerStore> createInstantly()
DefaultListenerStore
without options to further configure it.EventProviderConfigurator.ProviderChooser<DefaultListenerStore> defaultStore()
DefaultListenerStore to manage Listeners for the EventProvider instance to be created.<S extends ListenerStore> EventProviderConfigurator.ProviderChooser<S> store(Supplier<S> storeSupplier)
ListenerStore to
use.S - The type of the ListenerStore.storeSupplier - Supplier which supplies the ListenerStore.<S extends ListenerStore> EventProviderConfigurator.ProviderChooser<S> store(S store)
store to manage Listeners
for the EventProvider instance to be created.S - The type of the ListenerStore.store - The ListenerStore to use.Copyright © 2014–2015. All rights reserved.