org.ow2.jasmine.monitoring.mbeancmd
Class AbstractCommand

java.lang.Object
  extended byorg.ow2.jasmine.monitoring.mbeancmd.AbstractCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
Dump, Mbean, MLoad, Poll, Replay, Stat

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

A Command which has some methods implemented.


Field Summary
protected  java.lang.String[] arguments
          Command arguments.
protected  java.lang.String name
          Name of the command.
static java.text.SimpleDateFormat simpleDateFormat
           
 
Constructor Summary
AbstractCommand()
           
 
Method Summary
abstract  int exec()
          Abstract redefinition of inherited method.
protected  java.lang.String getHelpDoc()
          Gets the help document corresponding to this command.
 java.lang.String getName()
          Implementation of inherited method.
 void help()
          Implementation of inherited method.
 void setArgs(java.lang.String cmd, java.lang.String[] args)
          Implementation of inherited method.
abstract  java.lang.String summary()
          Abstract redefinition of inherited method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
Name of the command.


arguments

protected java.lang.String[] arguments
Command arguments.


simpleDateFormat

public static final java.text.SimpleDateFormat simpleDateFormat
Constructor Detail

AbstractCommand

public AbstractCommand()
Method Detail

exec

public abstract int exec()
Abstract redefinition of inherited method.

Specified by:
exec in interface Command
Returns:
0 if succeeded, an error code otherwise.
See Also:
Command.exec()

getName

public final java.lang.String getName()
Implementation of inherited method.

Specified by:
getName in interface Command
Returns:
Name of the command.
See Also:
Command.getName()

getHelpDoc

protected java.lang.String getHelpDoc()
Gets the help document corresponding to this command.

Returns:
Name of the help document corresponding to this command.

help

public void help()
Implementation of inherited method.

Specified by:
help in interface Command
See Also:
Command.help(), getHelpDoc()

setArgs

public final void setArgs(java.lang.String cmd,
                          java.lang.String[] args)
Implementation of inherited method.

Specified by:
setArgs in interface Command
Parameters:
cmd - Command name.
args - Command arguments.
See Also:
Command.setArgs(java.lang.String, java.lang.String[])

summary

public abstract java.lang.String summary()
Abstract redefinition of inherited method.

Specified by:
summary in interface Command
Returns:
Command's summary.
See Also:
Command.summary()