public class SingleThreadEventReceivingStrategy extends java.lang.Object implements EventReceivingStrategy
EventReceivingStrategy
that uses a single thread for all handlers.Constructor and Description |
---|
SingleThreadEventReceivingStrategy() |
Modifier and Type | Method and Description |
---|---|
void |
addFilter(Filter filter)
Adds a filter that is applied for all registered handlers some time after
this method call.
|
void |
addHandler(Handler handler,
boolean wait) |
void |
handle(Event e) |
void |
removeFilter(Filter filter)
Removes a filter that is remove for all registered handlers some time
after this method call.
|
void |
removeHandler(Handler handler,
boolean wait) |
void |
shutdownAndWait() |
public void handle(Event e)
handle
in interface EventHandler
public void addFilter(Filter filter)
EventReceivingStrategy
addFilter
in interface EventReceivingStrategy
filter
- filter to add, not null
public void removeFilter(Filter filter)
EventReceivingStrategy
removeFilter
in interface EventReceivingStrategy
filter
- filter to remove, not null
public void addHandler(Handler handler, boolean wait)
addHandler
in interface EventReceivingStrategy
public void removeHandler(Handler handler, boolean wait) throws java.lang.InterruptedException
removeHandler
in interface EventReceivingStrategy
java.lang.InterruptedException
public void shutdownAndWait() throws java.lang.InterruptedException
shutdownAndWait
in interface EventReceivingStrategy
java.lang.InterruptedException