org.globus.cog.karajan.workflow.nodes.grid
Class AbstractGridNode

java.lang.Object
  extended by org.globus.cog.karajan.workflow.nodes.FlowNode
      extended by org.globus.cog.karajan.workflow.nodes.FlowContainer
          extended by org.globus.cog.karajan.workflow.nodes.Sequential
              extended by org.globus.cog.karajan.workflow.nodes.AbstractSequentialWithArguments
                  extended by org.globus.cog.karajan.workflow.nodes.SequentialWithArguments
                      extended by org.globus.cog.karajan.workflow.nodes.grid.AbstractGridNode
All Implemented Interfaces:
StatusListener, LoadListener, EventListener, ExtendedFlowElement, FlowElement
Direct Known Subclasses:
AbstractFileOperation, GridExec, GridTransfer

public abstract class AbstractGridNode
extends SequentialWithArguments
implements StatusListener


Nested Class Summary
 
Nested classes/interfaces inherited from class org.globus.cog.karajan.workflow.nodes.FlowNode
FlowNode.FNTP
 
Field Summary
static Arg A_SECURITY_CONTEXT
           
static String HANDLER
           
protected  Map tasks
           
 
Fields inherited from class org.globus.cog.karajan.workflow.nodes.AbstractSequentialWithArguments
QUOTED
 
Fields inherited from class org.globus.cog.karajan.workflow.nodes.FlowNode
A_INLINE_TEXT, debug, startCount, STDERR, STDOUT, threadTracker
 
Fields inherited from interface org.globus.cog.karajan.workflow.nodes.FlowElement
ANNOTATION, CALLER, FILENAME, LINE, TEXT, UID
 
Constructor Summary
AbstractGridNode()
           
 
Method Summary
 void abortEvent(AbortEvent e)
           
 void fireNotificationEvent(FlowEvent event, VariableStack stack)
          Overriden to release the notification threads as soon as possible.
protected  Contact getHost(VariableStack stack, Arg hostarg, Scheduler scheduler, String provider)
           
 Scheduler getScheduler(VariableStack stack)
           
protected  SecurityContext getSecurityContext(VariableStack stack, String provider)
           
 void post(VariableStack stack)
           
protected  void removeTask(Task task)
           
 void setSecurityContext(VariableStack stack, Service service)
           
protected  void setSecurityContextIfNotLocal(Service service, SecurityContext sc)
           
 void statusChanged(StatusEvent e)
           
 void submitScheduled(Scheduler scheduler, Task task, VariableStack stack, Object constraints)
           
protected abstract  void submitTask(VariableStack stack)
           
 void submitUnscheduled(TaskHandler handler, Task task, VariableStack stack)
           
protected  void taskCompleted(StatusEvent e, VariableStack stack)
           
protected  void taskFailed(StatusEvent e, VariableStack stack)
           
 
Methods inherited from class org.globus.cog.karajan.workflow.nodes.AbstractSequentialWithArguments
addChannel, argumentsEvaluated, checkArguments, childCompleted, getArgument, getArgumentCount, getArgumentIndex, getArgumentNames, getArguments, getChannels, getMaxArgIndex, getNonpropargs, getOptionalArgs, getQuotedArgs, getSortedArgs, hasChannels, hasNestedArguments, hasVariableArguments, initializeArgs, initializeStatic, newNameBindingVariableArguments, newVariableArguments, pre, processArguments, setArguments, setHasVargs, setNestedArgs, setNonpropargs, setQuotedArgs, setVargs
 
Methods inherited from class org.globus.cog.karajan.workflow.nodes.Sequential
executeChildren, executeSingle, exit, getIndex, moreToExecute, notificationEvent, preDecIndex, preIncIndex, setIndex, startElement, startNext
 
Methods inherited from class org.globus.cog.karajan.workflow.nodes.FlowContainer
execute, getChildFailed, isOptimizable, setChildFailed, setOptimize
 
Methods inherited from class org.globus.cog.karajan.workflow.nodes.FlowNode
_finally, abort, acceptsInlineText, addElement, addStaticArgument, checkClass, checkCompleted, checkFailed, complete, controlEvent, copy, echo, echo, elementCount, elements, event, executeErrorHandler, executeSimple, fail, fail, failIfNotDefined, failIfNull, failIfNull, failImmediately, failImmediately, failImmediately, failImmediately, fireControlEvent, fireMonitoringEvent, fireStatusMonitoringEvent, get_locator, getBooleanProperty, getBooleanProperty, getCanonicalType, getElement, getElementType, getIntProperty, getIntProperty, getParent, getProperty, getStaticArguments, getStringProperty, getTextualName, getTreeProperty, getUID, hasFrame, hasProperty, isCheckpointable, isSimple, isSystemProperty, loadComplete, loadStarted, monitoringEvent, propertyNames, removeElement, removeElement, removeProperty, replaceElement, restart, restartElement, ret, set_locator, setAcceptsInlineText, setCheckpointable, setElements, setElementType, setFrame, setParent, setProperties, setProperty, setProperty, setProperty, setStaticArguments, start, startElement, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HANDLER

public static final String HANDLER
See Also:
Constant Field Values

tasks

protected Map tasks

A_SECURITY_CONTEXT

public static final Arg A_SECURITY_CONTEXT
Constructor Detail

AbstractGridNode

public AbstractGridNode()
Method Detail

post

public final void post(VariableStack stack)
                throws ExecutionException
Overrides:
post in class FlowContainer
Throws:
ExecutionException

submitTask

protected abstract void submitTask(VariableStack stack)
                            throws ExecutionException
Throws:
ExecutionException

getScheduler

public Scheduler getScheduler(VariableStack stack)
                       throws ExecutionException
Throws:
ExecutionException

getHost

protected Contact getHost(VariableStack stack,
                          Arg hostarg,
                          Scheduler scheduler,
                          String provider)
                   throws ExecutionException
Throws:
ExecutionException

setSecurityContext

public void setSecurityContext(VariableStack stack,
                               Service service)
                        throws ExecutionException
Throws:
ExecutionException

abortEvent

public void abortEvent(AbortEvent e)
                throws ExecutionException
Overrides:
abortEvent in class FlowNode
Throws:
ExecutionException

submitUnscheduled

public void submitUnscheduled(TaskHandler handler,
                              Task task,
                              VariableStack stack)
                       throws ExecutionException
Throws:
ExecutionException

submitScheduled

public void submitScheduled(Scheduler scheduler,
                            Task task,
                            VariableStack stack,
                            Object constraints)

statusChanged

public void statusChanged(StatusEvent e)
Specified by:
statusChanged in interface StatusListener

removeTask

protected void removeTask(Task task)

taskFailed

protected void taskFailed(StatusEvent e,
                          VariableStack stack)
                   throws ExecutionException
Throws:
ExecutionException

taskCompleted

protected void taskCompleted(StatusEvent e,
                             VariableStack stack)
                      throws ExecutionException
Throws:
ExecutionException

setSecurityContextIfNotLocal

protected void setSecurityContextIfNotLocal(Service service,
                                            SecurityContext sc)

getSecurityContext

protected SecurityContext getSecurityContext(VariableStack stack,
                                             String provider)
                                      throws InvalidProviderException,
                                             ProviderMethodException,
                                             ExecutionException
Throws:
InvalidProviderException
ProviderMethodException
ExecutionException

fireNotificationEvent

public void fireNotificationEvent(FlowEvent event,
                                  VariableStack stack)
Overriden to release the notification threads as soon as possible.

Overrides:
fireNotificationEvent in class FlowNode