|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.globus.cog.gridface.impl.commands.GridCommandImpl
Base class for all Grid Commands. Follows adapter pattern. Specific commands extend this class to override a few methods
| Field Summary | |
protected Task |
task
|
| Fields inherited from interface org.globus.cog.abstraction.interfaces.ExecutableObject |
TASK, TASKGRAPH |
| Constructor Summary | |
GridCommandImpl()
|
|
| Method Summary | |
void |
addArgument(String arg)
Add one argument at a time |
void |
addStatusListener(StatusListener listener)
Add status listener |
String |
getArgument(int n)
Return the nth argument |
Vector |
getArguments()
Returns all arguments in a vector. |
int |
getArgumentsSize()
Return the total number of arguments |
Object |
getAttribute(String name)
Get the attribute with given name |
Hashtable |
getAttributes()
Get all attributes in the form of a hash table |
String |
getCommand()
Return command name |
Calendar |
getCompletedTime()
|
String |
getError()
Get error message of the task belonging to this command |
Exception |
getException()
Returns the exception for the current status object this is here so it can be overridden by the exec object to make sence of the error codes of jglobus |
String |
getExceptionString()
returns an excpetion and its stack to a string using the static method in gridfaces.impl.util.LoggerImpl |
Integer |
getId()
|
Identity |
getIdentity()
Return id for this command |
String |
getName()
Return name of this command |
int |
getObjectType()
|
Status |
getStatus()
Return status of the command |
Enumeration |
getStatusListeners()
Get a list of status listeners |
Calendar |
getSubmittedTime()
|
Task |
getTask()
|
Object |
getTaskAttribute(String key)
Return task attributes |
Task |
prepareFileOperationTask()
prepare a file operation task |
Task |
prepareFileTransferTask()
Prepares a file transfer task with File transfer specification |
Task |
prepareJobSubmissionTask()
Prepares job submission task with JobSpecification |
void |
removeStatusListener(StatusListener listener)
Remove status listener |
void |
setArguments(String[] args)
Set many arguments at a time |
void |
setAttribute(String name,
Object value)
set attributes for the given command |
void |
setAttributes(Hashtable attribs)
|
void |
setCommand(String command)
set command name |
void |
setIdentity(Identity id)
Set id for this command |
void |
setName(String name)
Set name for this command |
void |
setStatus(int status)
Set status of the command |
void |
setStatus(Status status)
Set status of the command |
void |
setTask(Task newTask)
|
void |
setTaskAttribute(String key,
Object value)
set attributes for the task |
void |
statusChanged(StatusEvent event)
Listen to status of the tasks prepared by this command |
boolean |
validate()
Validate the inputs for this command |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.globus.cog.gridface.interfaces.GridCommand |
getOutput, prepareTask |
| Field Detail |
protected Task task
| Constructor Detail |
public GridCommandImpl()
| Method Detail |
public void setArguments(String[] args)
setArguments in interface GridCommandpublic void addArgument(String arg)
addArgument in interface GridCommandpublic void setCommand(String command)
setCommand in interface GridCommandpublic String getCommand()
getCommand in interface GridCommandpublic String getArgument(int n)
getArgument in interface GridCommandpublic int getArgumentsSize()
getArgumentsSize in interface GridCommandpublic Vector getArguments()
getArguments in interface GridCommand
public Task prepareFileOperationTask()
throws Exception
Exception
public Task prepareFileTransferTask()
throws Exception
Exception
public Task prepareJobSubmissionTask()
throws Exception
Exception
public void setAttribute(String name,
Object value)
setAttribute in interface GridCommandpublic void setAttributes(Hashtable attribs)
setAttributes in interface GridCommandpublic Object getAttribute(String name)
getAttribute in interface GridCommandpublic Hashtable getAttributes()
getAttributes in interface GridCommandpublic Calendar getCompletedTime()
getCompletedTime in interface GridCommandpublic Integer getId()
getId in interface GridCommandpublic Calendar getSubmittedTime()
getSubmittedTime in interface GridCommandpublic Task getTask()
getTask in interface GridCommandpublic void setTask(Task newTask)
setTask in interface GridCommandpublic void addStatusListener(StatusListener listener)
addStatusListener in interface GridCommandpublic void removeStatusListener(StatusListener listener)
removeStatusListener in interface GridCommandpublic Enumeration getStatusListeners()
getStatusListeners in interface GridCommandpublic boolean validate()
validate in interface GridCommandpublic void setStatus(int status)
setStatus in interface ExecutableObjectpublic void setStatus(Status status)
setStatus in interface ExecutableObjectpublic Status getStatus()
getStatus in interface ExecutableObjectpublic void statusChanged(StatusEvent event)
statusChanged in interface StatusListenerpublic void setIdentity(Identity id)
setIdentity in interface ExecutableObjectpublic Identity getIdentity()
getIdentity in interface ExecutableObjectpublic void setName(String name)
setName in interface ExecutableObjectpublic String getName()
getName in interface ExecutableObjectpublic String getError()
getError in interface GridCommand
public void setTaskAttribute(String key,
Object value)
setTaskAttribute in interface GridCommandpublic Object getTaskAttribute(String key)
getTaskAttribute in interface GridCommandpublic int getObjectType()
getObjectType in interface ExecutableObjectpublic Exception getException()
GridCommand
getException in interface GridCommandpublic String getExceptionString()
GridCommand
getExceptionString in interface GridCommand
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||