Class ConcurrentEventHandling<T extends Event>
- java.lang.Object
-
- de.aristaflow.adept2.core.eventmanager.common.ConcurrentEventHandling<T>
-
- Type Parameters:
T
- The type of events that are handled concurrently.
public class ConcurrentEventHandling<T extends Event> extends Object implements Callable<Boolean>
A simple class for handling events concurrently via an executor service.- Author:
- Ulrich Kreher
-
-
Field Summary
Fields Modifier and Type Field Description protected T
event
The event to be handled.protected EventHandler
handler
The event handler.
-
Constructor Summary
Constructors Constructor Description ConcurrentEventHandling(EventHandler handler, T event)
Creates a newCallable
for handling an event asynchronously.
-
-
-
Field Detail
-
handler
protected final EventHandler handler
The event handler.
-
-
Constructor Detail
-
ConcurrentEventHandling
public ConcurrentEventHandling(EventHandler handler, T event)
Creates a newCallable
for handling an event asynchronously.- Parameters:
handler
- The event handler.event
- The event to be handled.
-
-
Method Detail
-
call
public Boolean call() throws EventHandlingException
- Specified by:
call
in interfaceCallable<T extends Event>
- Throws:
EventHandlingException
-
-