wtanaka.praya.console
Class AbstractCommand

java.lang.Object
  |
  +--wtanaka.praya.console.AbstractCommand
All Implemented Interfaces:
CommandInterface

public abstract class AbstractCommand
extends java.lang.Object
implements CommandInterface

AbstractCommand

Return to Sourceforge or the Praya Homepage

Version:
$Name: $ $Date: 2002/07/14 19:01:33 $
Author:
wtanaka

Constructor Summary
AbstractCommand()
           
 
Method Summary
 java.lang.String execute(java.lang.String args)
          Converts this into a call to execute(String[])
abstract  java.lang.String execute(java.lang.String[] args)
          Runs a protocol-specific command.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 
Methods inherited from interface wtanaka.praya.console.CommandInterface
help
 

Constructor Detail

AbstractCommand

public AbstractCommand()
Method Detail

execute

public abstract java.lang.String execute(java.lang.String[] args)
                                  throws CommandFailedException,
                                         NotSupportedException
Runs a protocol-specific command.
Parameters:
args - a non-null, non-zero list of arguments to pass to this command. The first element in the array is the command that was called.
Returns:
a message which should be displayed to the user after the command suceeded/failed.
Throws:
CommandFailedException - if this handles the given command, and the command was attempted and it failed.
NotSupportedException - if this does not handle the given command, so nothing was attempted.

execute

public java.lang.String execute(java.lang.String args)
                         throws CommandFailedException,
                                NotSupportedException
Converts this into a call to execute(String[])
Specified by:
execute in interface CommandInterface
See Also:
CommandInterface.execute(String)