S - The type of the ListenerStore to use.C - The type of your own fluent API interface.E - The type of the EventProvider this configurator will create.public interface CustomConfigurator<S extends ListenerStore,C,E extends EventProvider<S>>
EventProvider.configure(). Default usage pattern is:
EventProvider.configure()
.defaultStore()
.useCustomProvider(new MyCustomConfigurator()).and()
... // your API follows here
The EventProviderConfigurator.ProviderChooser.useCustomProvider(CustomConfigurator) method
calls this class' getConfigurator(Supplier) method, passing in an
object that supplies the listener store which the user selected in the first
step. This method should return an instance of your own fluent API
implementation.
The createNow(Supplier) method is called if the user decided to
create the EventProvider instance right after choosing the ListenerStore like
in:
EventProvier<?> provider = EventProvider.configure()
.defaultStore()
.useCustomProvider(new MyCustomConfigurator())
.create(); // or .createSupplier()
| Modifier and Type | Method and Description |
|---|---|
E |
createNow(Supplier<S> storeSupplier)
Creates a new EventProvider with the ListenerStore configured in the
first step.
|
C |
getConfigurator(Supplier<S> storeSupplier)
Creates the object which will be returned by
EventProviderConfigurator.ProviderChooser.useCustomProvider(CustomConfigurator). |
C getConfigurator(Supplier<S> storeSupplier)
EventProviderConfigurator.ProviderChooser.useCustomProvider(CustomConfigurator).storeSupplier - A supplier for the ListenerStore which has been
configured in the first step.Copyright © 2014–2015. All rights reserved.