S - The type of the ListenerStore configured in the first
step.public static interface EventProviderConfigurator.ProviderChooser<S extends ListenerStore>
<C,E extends EventProvider<S>> EventProviderConfigurator.Chainable<C,E> useCustomProvider(CustomConfigurator<S,C,E> configurator)
EventProvider instances. See the CustomConfigurator
for further information.C - Type of the returned Fluent API objectE - Type of the configured EventProvider.configurator - The custom fluent API entry point.EventProviderConfigurator.Chainable<EventProviderConfigurator.ProviderConfigurator<S,UnrollingEventProvider<S>>,UnrollingEventProvider<S>> useUnrollingProvider()
UnrollingEventProvider. This provider fires
event sequentially within the current thread but will not fire nested
events. Instead, nested events will be added to a queue which will be
processed once the current dispatch action is done.EventProviderConfigurator.Chainable<EventProviderConfigurator.ProviderConfigurator<S,SequentialEventProvider<S>>,SequentialEventProvider<S>> useSynchronousProvider()
dispatch method was
called. The configured provider will be sequential, if the previously
selected ListenerStore is sequential. Closing the returned
Provider will have no additional effects besides removing all of its
registered listeners.EventProviderConfigurator.Chainable<EventProviderConfigurator.AsyncProviderConfigurator<S,AsynchronousEventProvider<S>>,AsynchronousEventProvider<S>> useAsynchronousProvider()
EventProvider which fires each event in a
different thread. By default, the configured EventProvider
uses a single thread executor service.
The returned instance is sequential if the previously configured
ListenerStore is sequential. Even when using multiple threads
to dispatch events, the returned EventProvider will only use one
thread for one dispatch action. That means that for each call to
dispatch, all targeted listeners are notified within the same
thread. This ensures notification in the order the listeners have
been added.
When closing the returned EventProvider, its internal
ExecutorService instance will be shut down. Its not possible
to reuse the provider after closing it.
EventProviderConfigurator.Chainable<EventProviderConfigurator.AsyncProviderConfigurator<S,ParallelEventProvider<S>>,ParallelEventProvider<S>> useParallelProvider()
EventProvider which notifies each listener
within an own thread. This means that for a single event, multiple
threads might get created to notify all listeners concurrently. The
internal thread creation is by default handled by an
cached thread pool. The
returned EventProvider instance is not sequential and does not
support aborting of event delegation, as the correct order of
delegation can not be guaranteed.
When closing the returned EventProvider, its internal
ExecutorService instance will be shut down. Its not possible
to reuse the provider after closing it.
EventProviderConfigurator.Chainable<EventProviderConfigurator.ProviderConfigurator<S,AWTEventProvider<S>>,AWTEventProvider<S>> useWaitingAWTEventProvider()
EventProvider which dispatches all events in
the AWT event thread and waits (blocks current thread) after
dispatching until all listeners have been notified. The returned
instance is sequential if the previously configured
ListenerStore is sequential.
Closing the EventProvider returned by this method will have
no effect besides removing all registered listeners.
EventProviderConfigurator.Chainable<EventProviderConfigurator.ProviderConfigurator<S,AWTEventProvider<S>>,AWTEventProvider<S>> useAsynchronAWTEventProvider()
EventProvider which dispatches all events in
the AWT event thread. Dispatching with this EventProvider will return
immediately and dispatching of an event will be scheduled to be run
later by the AWT event thread. The returned instance is sequential if
the previously configured ListenerStore is sequential.
Closing the EventProvider returned by this method will have
no effect besides removing all registered listeners.
Copyright © 2014–2015. All rights reserved.