org.d_haven.event.command
Interface CommandManager

All Known Implementing Classes:
DefaultCommandManager

public interface CommandManager

Created by IntelliJ IDEA. User: bloritsch Date: May 3, 2004 Time: 4:19:52 PM To change this template use File | Settings | File Templates.


Method Summary
 void enqueueCommand(Command command)
          Add a command to the manager for it to execute.
 void setCommandFailureHandler(CommandFailureHandler handler)
          Set the failure handler that the application can use to override what happens when a command failure happens.
 void start()
          Start or restart the CommandManager so that it can accept more commands.
 void stop(boolean clear)
          Stop the CommandManager so that it can stop accepting commands.
 

Method Detail

setCommandFailureHandler

void setCommandFailureHandler(CommandFailureHandler handler)
Set the failure handler that the application can use to override what happens when a command failure happens.

Parameters:
handler - the new Handler
Throws:
java.lang.IllegalArgumentException - if "handler" is null.

enqueueCommand

void enqueueCommand(Command command)
                    throws SinkException
Add a command to the manager for it to execute.

Parameters:
command - the command to enqueue and run
Throws:
SinkException - if the command cannot be accepted.

start

void start()
Start or restart the CommandManager so that it can accept more commands.


stop

void stop(boolean clear)
Stop the CommandManager so that it can stop accepting commands.

Parameters:
clear - out currently enqueued commmands.