org.globus.cog.gridshell.commands.taskcommands
Class AbstractTaskCommand

java.lang.Object
  extended byorg.globus.cog.gridshell.commands.AbstractCommand
      extended byorg.globus.cog.gridshell.commands.AbstractShellCommand
          extended byorg.globus.cog.gridshell.commands.taskcommands.AbstractTaskCommand
All Implemented Interfaces:
Command, Comparable, EventListener, PropertyChangeListener, PropertyChangeNotifier, Runnable, StatusListener
Direct Known Subclasses:
AbstractDirCommand, AbstractNoArgCommand, AbstractSrcDestinationCommand, Chmod, Exec, Ls, Open

public abstract class AbstractTaskCommand
extends AbstractShellCommand
implements StatusListener

An abstract class that is used for GridShell commands that use tasks from abstractions


Field Summary
protected  StringBuffer bufferedResult
           
 
Fields inherited from class org.globus.cog.gridshell.commands.AbstractShellCommand
getopt
 
Fields inherited from class org.globus.cog.gridshell.commands.AbstractCommand
PROPERTY_STATUS_CODE
 
Constructor Summary
AbstractTaskCommand()
           
 
Method Summary
 void addTask(AbstractTask task)
           
 void appendResult(Object value)
           
 Object destroy()
          Destroys this command - called after the command has been completed
 Object execute()
          Executes this command
 StartTask getConnection()
           
 ConnectionManager getConnectionManager()
           
 AbstractTask getTask()
           
 TaskGraph getTaskGraph()
           
abstract  Object getTaskOutput()
          Gets the output for this command, allows the command to format the output (ie the ls command)
 void propertyChange(PropertyChangeEvent arg0)
           
 void setTask(AbstractTask task)
           
 void statusChanged(StatusEvent event)
           
 
Methods inherited from class org.globus.cog.gridshell.commands.AbstractShellCommand
createAbstractShellCommand, createGetOpt, getCredentials, getGetOpt, getGridShell, getGsh, init, kill, resume, run, suspend, toString
 
Methods inherited from class org.globus.cog.gridshell.commands.AbstractCommand
addPropertyChangeListener, addPropertyChangeListener, arrayToMap, compareTo, getIdentity, getParent, getResult, getScope, getStatus, removePropertyChangeListener, setResult, setStatusCode, setStatusCompleted, setStatusFailed, setStatusFailed, unsupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bufferedResult

protected StringBuffer bufferedResult
Constructor Detail

AbstractTaskCommand

public AbstractTaskCommand()
Method Detail

getTaskOutput

public abstract Object getTaskOutput()
Gets the output for this command, allows the command to format the output (ie the ls command)

Returns:

appendResult

public void appendResult(Object value)

setTask

public void setTask(AbstractTask task)

addTask

public void addTask(AbstractTask task)

getConnection

public StartTask getConnection()

getConnectionManager

public ConnectionManager getConnectionManager()

getTask

public AbstractTask getTask()

getTaskGraph

public TaskGraph getTaskGraph()

execute

public Object execute()
               throws Exception
Description copied from interface: Command
Executes this command

Specified by:
execute in interface Command
Returns:
Throws:
Exception

statusChanged

public void statusChanged(StatusEvent event)
Specified by:
statusChanged in interface StatusListener

propertyChange

public void propertyChange(PropertyChangeEvent arg0)
Specified by:
propertyChange in interface PropertyChangeListener

destroy

public Object destroy()
               throws Exception
Description copied from interface: Command
Destroys this command - called after the command has been completed

Specified by:
destroy in interface Command
Returns:
Throws:
Exception