public abstract class AbstractDispatcher extends Object implements Dispatcher
| Constructor and Description |
|---|
AbstractDispatcher() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
processEventThroughFilterAndHandler(Event<Object> event,
EventFilter<Object> filter,
EventHandler<Object> handler,
Collection<ExceptionHandler> exceptionHandlers)
Passes the specified event to the specified event handler if the specified event filter accepts it.
|
protected void |
processUncheckedException(Throwable t,
Collection<ExceptionHandler> exceptionHandlers,
Event<?> event)
Processes the specified exception with the specified exception handlers.
|
protected void |
processUndeliveredEvent(Event<Object> event,
Collection<EventHandler<Object>> undeliveredEventHandlers,
Collection<ExceptionHandler> exceptionHandlers)
Passes the specified event to the specified undelivered event handlers.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdispatch, disposeprotected final boolean processEventThroughFilterAndHandler(Event<Object> event, EventFilter<Object> filter, EventHandler<Object> handler, Collection<ExceptionHandler> exceptionHandlers)
If an exception is thrown during the processing of the event, the specified exception handlers will be used.
In theory, this method can be called by any concrete implementation of this class, since it can be considered as a basic building block of any dispatch logic.
event - Event to be processed.filter - Event filter to be tested before passing the event to the event handler.handler - Event handler to be used to process the event.exceptionHandlers - Exception handlers to be used in case an unchecked exception is thrown.protected final void processUndeliveredEvent(Event<Object> event, Collection<EventHandler<Object>> undeliveredEventHandlers, Collection<ExceptionHandler> exceptionHandlers)
If an exception is thrown during the processing of the event, the specified exception handlers will be used.
In theory, this method can be called by any concrete implementation of this class, since it can be considered as a basic building block of any dispatch logic.
event - Event to be processed.undeliveredEventHandlers - Event handlers to be used to process the event.exceptionHandlers - Exception handlers to be used in case an unchecked exception is thrown.protected final void processUncheckedException(Throwable t, Collection<ExceptionHandler> exceptionHandlers, Event<?> event)
t - Exception to be processed.exceptionHandlers - Handlers to be used to process the exception.event - Dispatched event for which the exception was thrown.Copyright © 2017. All rights reserved.