org.d_haven.event.command
Class DefaultCommandFailureHandler

java.lang.Object
  extended by org.d_haven.event.command.DefaultCommandFailureHandler
All Implemented Interfaces:
CommandFailureHandler

public class DefaultCommandFailureHandler
extends java.lang.Object
implements CommandFailureHandler

DefaultCommandFailureHandler is used to do nothing if a command fails.

Version:
CVS $ Revision: 1.1 $
Author:
Berin Loritsch

Constructor Summary
DefaultCommandFailureHandler()
           
 
Method Summary
 boolean handleCommandFailure(Command command, java.lang.Throwable throwable)
          Handle a command failure.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultCommandFailureHandler

public DefaultCommandFailureHandler()
Method Detail

handleCommandFailure

public boolean handleCommandFailure(Command command,
                                    java.lang.Throwable throwable)
Handle a command failure. If a command throws an exception, it has failed. The DefaultCommandManager will call this method so that we can handle the problem effectively. This implementation prints the problem to System.err and always returns false.

Specified by:
handleCommandFailure in interface CommandFailureHandler
Parameters:
command - The original Command object that failed
throwable - The throwable that caused the failure
Returns:
false so the CommandManager should continue to process commands.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object