public class CommandEventPipeline extends java.lang.Object implements EventPipeline
| Modifier and Type | Field and Description |
|---|---|
private EventHandler |
m_eventHandler |
private Pipe |
m_incoming |
private Pipe |
m_recurring |
private Source[] |
m_sources |
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
java.lang.String |
toString()
Provide a string representation of the pipeline for debugging
purposes.
|
private final Pipe m_recurring
private final Pipe m_incoming
private final EventHandler m_eventHandler
private final Source[] m_sources
public CommandEventPipeline(EnqueuePredicate predicate, EventHandler handler)
predicate - The predicate used to determine if we are
accepting commandshandler - The handler used to send the eventspublic Sink getIncomingSink()
public Sink getRecurringSink()
public final Source[] getSources()
getSources in interface EventPipelinepublic final EventHandler getEventHandler()
getEventHandler in interface EventPipelinepublic void clear()
public void clearHard()
public java.lang.String toString()
toString in class java.lang.Object