|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.globus.cog.gridshell.commands.AbstractCommand
This class is an abstract implementation of a command
| Field Summary | |
static String |
PROPERTY_STATUS_CODE
|
| Constructor Summary | |
AbstractCommand()
|
|
| Method Summary | |
void |
addPropertyChangeListener(PropertyChangeListener pcListener)
Add a property change listener |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener pcListener)
Add a property change listener for propertyName |
static Map |
arrayToMap(Object[] array)
|
int |
compareTo(Object thatObj)
|
Identity |
getIdentity()
Returns an identity for this command |
Command |
getParent()
Returns the parent of this command |
Object |
getResult()
Returns a result for this command once the status is COMPLETED |
Scope |
getScope()
Returns the scope associated with this command |
Status |
getStatus()
The status of this command |
Object |
init(Map args)
Accepts the arguments: Scope scope - the scope of this command Command parent - the parent of this command String resultVariableName - the variable in this scope to store a result by default |
void |
removePropertyChangeListener(PropertyChangeListener pcListener)
Remove a property change listener |
protected void |
setResult(Object result)
|
void |
setStatusCode(int value)
Sets the status of this Command |
void |
setStatusCompleted()
A helper method that calls this.setStatusCode(Status.COMPLETED); |
void |
setStatusFailed(String message)
|
void |
setStatusFailed(String message,
Exception thrown)
|
protected void |
unsupported()
|
| 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.gridshell.interfaces.Command |
destroy, execute, kill, resume, suspend |
| Methods inherited from interface java.lang.Runnable |
run |
| Methods inherited from interface java.beans.PropertyChangeListener |
propertyChange |
| Field Detail |
public static final String PROPERTY_STATUS_CODE
| Constructor Detail |
public AbstractCommand()
| Method Detail |
public Object init(Map args)
throws Exception
init in interface Commandargs - - a mapping of variable name to variable value
Exceptionprotected void setResult(Object result)
public Object getResult()
Command
getResult in interface Commandpublic Scope getScope()
Command
getScope in interface Commandpublic Identity getIdentity()
Command
getIdentity in interface Commandpublic Command getParent()
Command
getParent in interface Commandpublic final void setStatusCompleted()
public final void setStatusCode(int value)
Command
setStatusCode in interface Commandvalue - public final void setStatusFailed(String message)
public final void setStatusFailed(String message,
Exception thrown)
public final Status getStatus()
Command
getStatus in interface Commandpublic final void addPropertyChangeListener(PropertyChangeListener pcListener)
PropertyChangeNotifier
addPropertyChangeListener in interface PropertyChangeNotifierpcListener -
public final void addPropertyChangeListener(String propertyName,
PropertyChangeListener pcListener)
PropertyChangeNotifier
addPropertyChangeListener in interface PropertyChangeNotifierpropertyName - pcListener - public final void removePropertyChangeListener(PropertyChangeListener pcListener)
PropertyChangeNotifier
removePropertyChangeListener in interface PropertyChangeNotifierpcListener - public int compareTo(Object thatObj)
compareTo in interface Comparablepublic static Map arrayToMap(Object[] array)
protected void unsupported()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||