org.d_haven.event.command

Interface CommandManager

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
voidenqueueCommand(Command command)
Add a command to the manager for it to execute.
voidsetCommandFailureHandler(CommandFailureHandler handler)
Set the failure handler that the application can use to override what happens when a command failure happens.
voidstart()
Start or restart the CommandManager so that it can accept more commands.
voidstop(boolean clear)
Stop the CommandManager so that it can stop accepting commands.

Method Detail

enqueueCommand

public void enqueueCommand(Command command)
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.

setCommandFailureHandler

public 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: IllegalArgumentException if "handler" is null.

start

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

stop

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

Parameters: clear out currently enqueued commmands.