org.d_haven.event.command
public class CommandEventPipeline extends Object implements EventPipeline
Field Summary | |
---|---|
EventHandler | m_eventHandler |
Pipe | m_incoming |
Pipe | m_recurring |
Source[] | m_sources |
Constructor Summary | |
---|---|
CommandEventPipeline(EnqueuePredicate predicate, EventHandler handler)
The CommandEventPipeline is used to manage the incomming queue of
commands, the queue of commands to run later, and the event
handler to pass the commands to.
|
Method Summary | |
---|---|
void | clear()
Run any remaining incoming commands and then clear out all the
commands in the system. |
void | clearHard()
Remove all the commands from the system without running any of
them. |
EventHandler | getEventHandler()
Used by the ThreadManager to get the EventHandler for the
DefaultCommandManager.
|
Sink | getIncomingSink()
Provide a way to get the Sink to send new Commands to.
|
Sink | getRecurringSink()
Provide a way to get the Sink to requeue delayed Commands to.
|
Source[] | getSources()
Used by the Threadmanager to get the sources that are feeding the
DefaultCommandManager.
|
String | toString()
Provide a string representation of the pipeline for debugging
purposes.
|
Parameters: predicate The predicate used to determine if we are accepting commands handler The handler used to send the events
Returns: the EventHandler
Returns: the Sink for new commands
Returns: the Sink for delayed and repeated commands
Returns: the Array of one Source
Returns: the representation