org.globus.cog.abstraction.interfaces
Interface ExecutableObject

All Known Subinterfaces:
Queue, Set, Task, TaskGraph
All Known Implementing Classes:
QueueImpl, SetImpl, TaskGraphImpl, TaskImpl

public interface ExecutableObject

An ExecutableObject provides a high-level abstraction for elements that can be executed on the Grid. It can be specialized as a Grid Taskor a TaskGraph. Every ExecutableObject in the abstractions framework has a unique Identityand an execution Status.


Field Summary
static int TASK
          Represents a Tasktype ExecutableObject
static int TASKGRAPH
          Represents a TaskGraphtype ExecutableObject
 
Method Summary
 void addStatusListener(StatusListener listener)
          Adds a listener to receive status events when the status of an ExecutableObject is changed.
 Identity getIdentity()
          Returns the unique Identity assigned to this ExecutableObject.
 String getName()
          Returns the user-friendly name assigned to this ExecutableObject.
 int getObjectType()
          Returns the type of this ExecutableObject.
 Status getStatus()
          Returns the current Status of this ExecutableObject.
 void removeStatusListener(StatusListener listener)
          Removes the status listener from the list of active listeners.
 void setIdentity(Identity id)
          Sets a unique Identity for this ExecutableObject.
 void setName(String name)
          Sets the name of this ExecutableObject.
 void setStatus(int status)
          Sets the current status of this ExecutableObject.
 void setStatus(Status status)
          Sets the current Status of this ExecutableObject.
 

Field Detail

TASK

public static final int TASK
Represents a Tasktype ExecutableObject

See Also:
Constant Field Values

TASKGRAPH

public static final int TASKGRAPH
Represents a TaskGraphtype ExecutableObject

See Also:
Constant Field Values
Method Detail

setName

public void setName(String name)
Sets the name of this ExecutableObject. Defines a user-friendly name which need not be unique.

Parameters:
name - a string specifying the name of this ExecutableObject.

getName

public String getName()
Returns the user-friendly name assigned to this ExecutableObject.


setIdentity

public void setIdentity(Identity id)
Sets a unique Identity for this ExecutableObject.

Parameters:
id - the unique Identity.

getIdentity

public Identity getIdentity()
Returns the unique Identity assigned to this ExecutableObject.


getObjectType

public int getObjectType()
Returns the type of this ExecutableObject. Currently, two types are supported: Taskand TaskGraph. Additional types can be supported by classes implementing this interface.


setStatus

public void setStatus(Status status)
Sets the current Status of this ExecutableObject.

Parameters:
status - the latest status of this ExecutableObject.

setStatus

public void setStatus(int status)
Sets the current status of this ExecutableObject. Supported status are: Status.UNSUBMITTED, Status.SUBMITTED, Status.ACTIVE, Status.SUSPENDED,Status.RESUMED,Status.FAILED, Status.CANCELED,Status.COMPLETED, Status.UNKNOWN


getStatus

public Status getStatus()
Returns the current Status of this ExecutableObject.


addStatusListener

public void addStatusListener(StatusListener listener)
Adds a listener to receive status events when the status of an ExecutableObject is changed.

Parameters:
listener - the status listener

removeStatusListener

public void removeStatusListener(StatusListener listener)
Removes the status listener from the list of active listeners.