org.globus.cog.abstraction.impl.common.taskgraph
Class TaskGraphHandlerImpl
java.lang.Object
org.globus.cog.abstraction.impl.common.taskgraph.TaskGraphHandlerImpl
- All Implemented Interfaces:
- ChangeListener, StatusListener, TaskGraphHandler
- Direct Known Subclasses:
- QueueHandlerImpl, SetHandlerImpl
- public class TaskGraphHandlerImpl
- extends Object
- implements TaskGraphHandler, StatusListener, ChangeListener
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TaskGraphHandlerImpl
public TaskGraphHandlerImpl()
TaskGraphHandlerImpl
public TaskGraphHandlerImpl(GenericTaskHandler taskHandler)
submit
public void submit(TaskGraph taskgraph)
throws IllegalSpecException,
InvalidSecurityContextException,
InvalidServiceContactException,
TaskSubmissionException
- Description copied from interface:
TaskGraphHandler
- 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.
- Specified by:
submit in interface TaskGraphHandler
- Parameters:
taskgraph - the TaskGraph to be submitted
- Throws:
InvalidServiceContactException - when the ServiceContactassociated with any task in
this code>TaskGraph is invalid
InvalidSecurityContextException - when the SecurityContextassociated with with any
task in this code>TaskGraph is invalid
TaskSubmissionException - when generic errors occur during taskgraph submission
IllegalSpecException - when the Specificationassociated with any task in
this code>TaskGraph is illegal
suspend
public boolean suspend(Identity identity)
throws InvalidSecurityContextException,
TaskSubmissionException
- Description copied from interface:
TaskGraphHandler
- Suspends an
ExecutableObjectthat is currently active in the
taskgraph. A suspended object can be resumed using the
TaskGraphHandler.resume(Identity)method
- Specified by:
suspend in interface TaskGraphHandler
- 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
- Description copied from interface:
TaskGraphHandler
- Resumes the execution of an
ExecutableObjectin the taskgraph
that was previously suspended by the
TaskGraphHandler.suspend(Identity)method.
- Specified by:
resume in interface TaskGraphHandler
- 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
- Description copied from interface:
TaskGraphHandler
- Cancels the execution of an
ExecutableObject.
- Specified by:
cancel in interface TaskGraphHandler
- Parameters:
identity - the identity of the ExecutableObject to be
suspended
- Throws:
TaskSubmissionException - when generic errors occur
InvalidSecurityContextException - when the SecurityContextassociated with
ExecutableObject is invalid
getGraph
public TaskGraph getGraph()
- Specified by:
getGraph in interface TaskGraphHandler
statusChanged
public void statusChanged(StatusEvent event)
- Specified by:
statusChanged in interface StatusListener
getUnsubmittedNodes
public Enumeration getUnsubmittedNodes()
- Specified by:
getUnsubmittedNodes in interface TaskGraphHandler
getSubmittedNodes
public Enumeration getSubmittedNodes()
- Specified by:
getSubmittedNodes in interface TaskGraphHandler
getActiveNodes
public Enumeration getActiveNodes()
- Specified by:
getActiveNodes in interface TaskGraphHandler
getFailedNodes
public Enumeration getFailedNodes()
- Specified by:
getFailedNodes in interface TaskGraphHandler
getCompletedNodes
public Enumeration getCompletedNodes()
- Specified by:
getCompletedNodes in interface TaskGraphHandler
getSuspendedNodes
public Enumeration getSuspendedNodes()
- Specified by:
getSuspendedNodes in interface TaskGraphHandler
getCanceledNodes
public Enumeration getCanceledNodes()
- Specified by:
getCanceledNodes in interface TaskGraphHandler
executeIfAvailable
protected boolean executeIfAvailable(ExecutableObject node)
throws Exception
- Throws:
Exception
graphChanged
public void graphChanged(ChangeEvent event)
throws Exception
- Specified by:
graphChanged in interface ChangeListener
- Throws:
Exception
setTaskHandlerPolicy
public void setTaskHandlerPolicy(int policy)
- Specified by:
setTaskHandlerPolicy in interface TaskGraphHandler
getTaskHandlerPolicy
public int getTaskHandlerPolicy()
- Specified by:
getTaskHandlerPolicy in interface TaskGraphHandler