org.apache.geronimo.gshell.command
Class CommandSupport

java.lang.Object
  extended by org.apache.geronimo.gshell.command.CommandSupport
All Implemented Interfaces:
Command
Direct Known Subclasses:
CatCommand, EchoCommand, ExecuteCommand, ExitCommand, HelpCommand, JavaCommand, RshCommand, RshServerCommand, SetCommand, SleepCommand, SourceCommand, UnsetCommand, WaitCommand

public abstract class CommandSupport
extends Object
implements Command

Provides support for Command implemenations.

Version:
$Rev: 574416 $ $Date: 2007-09-10 17:49:15 -0700 (Mon, 10 Sep 2007) $

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.geronimo.gshell.command.Command
Command.Result
 
Field Summary
protected  CommandContext context
           
protected  IO io
           
protected  org.slf4j.Logger log
           
protected  Variables variables
           
 
Fields inherited from interface org.apache.geronimo.gshell.command.Command
FAILURE, SUCCESS
 
Constructor Summary
CommandSupport()
           
 
Method Summary
protected  void displayHelp(CommandLineProcessor clp)
           
protected abstract  Object doExecute()
           
 Object execute(Object... args)
          Execute the commands behavior.
 void init(CommandContext context)
          Initialize the command with its execution context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.slf4j.Logger log

context

protected CommandContext context

io

protected IO io

variables

protected Variables variables
Constructor Detail

CommandSupport

public CommandSupport()
Method Detail

init

public void init(CommandContext context)
Description copied from interface: Command
Initialize the command with its execution context.

Specified by:
init in interface Command

execute

public Object execute(Object... args)
               throws Exception
Description copied from interface: Command
Execute the commands behavior.

Specified by:
execute in interface Command
Throws:
Exception

doExecute

protected abstract Object doExecute()
                             throws Exception
Throws:
Exception

displayHelp

protected void displayHelp(CommandLineProcessor clp)


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.