org.globus.cog.abstraction.impl.common.taskgraph
Class TaskGraphHandlerImpl

java.lang.Object
  extended byorg.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


Field Summary
 
Fields inherited from interface org.globus.cog.abstraction.interfaces.TaskGraphHandler
CASCADED_TASK_HANDLER, NON_CASCADED_TASK_HANDLER
 
Constructor Summary
TaskGraphHandlerImpl()
           
TaskGraphHandlerImpl(GenericTaskHandler taskHandler)
           
 
Method Summary
 boolean cancel(Identity identity)
           
protected  boolean executeIfAvailable(ExecutableObject node)
           
 Enumeration getActiveNodes()
           
 Enumeration getCanceledNodes()
           
 Enumeration getCompletedNodes()
           
 Enumeration getFailedNodes()
           
 TaskGraph getGraph()
           
 Enumeration getSubmittedNodes()
           
 Enumeration getSuspendedNodes()
           
 int getTaskHandlerPolicy()
           
 Enumeration getUnsubmittedNodes()
           
 void graphChanged(ChangeEvent event)
           
 boolean resume(Identity identity)
           
 void setTaskHandlerPolicy(int policy)
           
 void statusChanged(StatusEvent event)
           
 void submit(TaskGraph taskgraph)
           
 boolean suspend(Identity identity)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskGraphHandlerImpl

public TaskGraphHandlerImpl()

TaskGraphHandlerImpl

public TaskGraphHandlerImpl(GenericTaskHandler taskHandler)
Method Detail

submit

public void submit(TaskGraph taskgraph)
            throws IllegalSpecException,
                   InvalidSecurityContextException,
                   InvalidServiceContactException,
                   TaskSubmissionException
Specified by:
submit in interface TaskGraphHandler
Throws:
IllegalSpecException
InvalidSecurityContextException
InvalidServiceContactException
TaskSubmissionException

suspend

public boolean suspend(Identity identity)
                throws InvalidSecurityContextException,
                       TaskSubmissionException
Specified by:
suspend in interface TaskGraphHandler
Throws:
InvalidSecurityContextException
TaskSubmissionException

resume

public boolean resume(Identity identity)
               throws InvalidSecurityContextException,
                      TaskSubmissionException
Specified by:
resume in interface TaskGraphHandler
Throws:
InvalidSecurityContextException
TaskSubmissionException

cancel

public boolean cancel(Identity identity)
               throws InvalidSecurityContextException,
                      TaskSubmissionException
Specified by:
cancel in interface TaskGraphHandler
Throws:
InvalidSecurityContextException
TaskSubmissionException

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