org.globus.cog.abstraction.interfaces
Interface TaskGraphHandler

All Known Subinterfaces:
QueueHandler, SetHandler
All Known Implementing Classes:
QueueHandlerImpl, SetHandlerImpl, TaskGraphHandlerImpl

public interface TaskGraphHandler

The TaskGraph enables remote execution of constituent ExecutableObject s by maintaining the control dependencies between them.


Field Summary
static int CASCADED_TASK_HANDLER
          Submits all Taskobjects (including those of children TaskGraph) to the SAME TaskHandler.
static int NON_CASCADED_TASK_HANDLER
          Submits all tasks of a TaskGraphto the same TaskHandler.
 
Method Summary
 boolean cancel(Identity identity)
          Cancels the execution of an ExecutableObject.
 Enumeration getActiveNodes()
           
 Enumeration getCanceledNodes()
           
 Enumeration getCompletedNodes()
           
 Enumeration getFailedNodes()
           
 TaskGraph getGraph()
           
 Enumeration getSubmittedNodes()
           
 Enumeration getSuspendedNodes()
           
 int getTaskHandlerPolicy()
           
 Enumeration getUnsubmittedNodes()
           
 boolean resume(Identity identity)
          Resumes the execution of an ExecutableObjectin the taskgraph that was previously suspended by the suspend(Identity)method.
 void setTaskHandlerPolicy(int policy)
           
 void submit(TaskGraph taskgraph)
          Submits the given TaskGraphfor execuiton.
 boolean suspend(Identity identity)
          Suspends an ExecutableObjectthat is currently active in the taskgraph.
 

Field Detail

CASCADED_TASK_HANDLER

public static final int CASCADED_TASK_HANDLER
Submits all Taskobjects (including those of children TaskGraph) to the SAME TaskHandler.

See Also:
Constant Field Values

NON_CASCADED_TASK_HANDLER

public static final int NON_CASCADED_TASK_HANDLER
Submits all tasks of a TaskGraphto the same TaskHandler. However, tasks of different TaskGraphare submitted to DIFFERENT TaskHandlerrespectively.

See Also:
Constant Field Values
Method Detail

submit

public void submit(TaskGraph taskgraph)
            throws IllegalSpecException,
                   InvalidSecurityContextException,
                   InvalidServiceContactException,
                   TaskSubmissionException
Submits the given TaskGraphfor execuiton. The TaskGraph is submitted to the TaskHandler in an asynchronous mode, whereby the method returns immediately after submitting the task graph. The status and output of the tasks can be monitored asynchronously by the ExecutableObject.addStatusListener(StatusListener)and Task.addOutputListener(OutputListener)methods respectively.

Parameters:
taskgraph - the TaskGraph to be submitted
Throws:
IllegalSpecException - when the Specificationassociated with any task in this code>TaskGraph is illegal
InvalidSecurityContextException - when the SecurityContextassociated with with any task in this code>TaskGraph is invalid
InvalidServiceContactException - when the ServiceContactassociated with any task in this code>TaskGraph is invalid
TaskSubmissionException - when generic errors occur during taskgraph submission

suspend

public boolean suspend(Identity identity)
                throws InvalidSecurityContextException,
                       TaskSubmissionException
Suspends an ExecutableObjectthat is currently active in the taskgraph. A suspended object can be resumed using the resume(Identity)method

Parameters:
identity - the identity of the ExecutableObject to be suspended
Throws:
InvalidSecurityContextException - when the SecurityContextassociated with ExecutableObject is invalid
TaskSubmissionException - when generic errors occur

resume

public boolean resume(Identity identity)
               throws InvalidSecurityContextException,
                      TaskSubmissionException
Resumes the execution of an ExecutableObjectin the taskgraph that was previously suspended by the suspend(Identity)method.

Parameters:
identity - the identity of the ExecutableObject to be suspended
Throws:
InvalidSecurityContextException - when the SecurityContextassociated with ExecutableObject is invalid
TaskSubmissionException - when generic errors occur

cancel

public boolean cancel(Identity identity)
               throws InvalidSecurityContextException,
                      TaskSubmissionException
Cancels the execution of an ExecutableObject.

Parameters:
identity - the identity of the ExecutableObject to be suspended
Throws:
InvalidSecurityContextException - when the SecurityContextassociated with ExecutableObject is invalid
TaskSubmissionException - when generic errors occur

getGraph

public TaskGraph getGraph()

getUnsubmittedNodes

public Enumeration getUnsubmittedNodes()

getSubmittedNodes

public Enumeration getSubmittedNodes()

getActiveNodes

public Enumeration getActiveNodes()

getFailedNodes

public Enumeration getFailedNodes()

getCompletedNodes

public Enumeration getCompletedNodes()

getSuspendedNodes

public Enumeration getSuspendedNodes()

getCanceledNodes

public Enumeration getCanceledNodes()

setTaskHandlerPolicy

public void setTaskHandlerPolicy(int policy)

getTaskHandlerPolicy

public int getTaskHandlerPolicy()