net.officefloor.frame.internal.structure
Interface JobSequence

All Superinterfaces:
FlowAsset, FlowFuture, LinkedListSetEntry<JobSequence,ThreadState>
All Known Implementing Classes:
JobSequenceImpl

public interface JobSequence
extends FlowAsset, FlowFuture, LinkedListSetEntry<JobSequence,ThreadState>

Represents a sequence of Job instances that are completed one after another.

May be used as a LinkedListSetEntry in a list of JobSequence instances for a ThreadState.

Author:
Daniel Sagenschneider

Method Summary
 JobNode createGovernanceNode(GovernanceActivity<?,?> governanceActivity, JobNode parallelNodeOwner)
          Creates a new JobNode contained in this JobSequence for the GovernanceActivity.
 JobNode createTaskNode(TaskMetaData<?,?,?> taskMetaData, JobNode parallelNodeOwner, Object parameter, GovernanceDeactivationStrategy governanceDeactivationStrategy)
          Creates a new JobNode contained in this JobSequence for the Task.
 ThreadState getThreadState()
          Obtains the ThreadState containing this JobSequence.
 void jobNodeComplete(JobNode jobNode, JobNodeActivateSet activateSet, TeamIdentifier currentTeam)
          Flags that the input JobNode has completed.
 
Methods inherited from interface net.officefloor.frame.internal.structure.FlowAsset
waitOnFlow
 
Methods inherited from interface net.officefloor.frame.api.execute.FlowFuture
isComplete
 
Methods inherited from interface net.officefloor.frame.internal.structure.LinkedListSetEntry
getLinkedListSetOwner, getNext, getPrev, setNext, setPrev
 

Method Detail

createTaskNode

JobNode createTaskNode(TaskMetaData<?,?,?> taskMetaData,
                       JobNode parallelNodeOwner,
                       Object parameter,
                       GovernanceDeactivationStrategy governanceDeactivationStrategy)
Creates a new JobNode contained in this JobSequence for the Task.

Parameters:
taskMetaData - TaskMetaData for the new JobNode.
parallelNodeOwner - JobNode that is the parallel owner of the new JobNode.
parameter - Parameter for the JobNode.
governanceDeactivationStrategy - GovernanceDeactivationStrategy.
Returns:
New JobNode.

createGovernanceNode

JobNode createGovernanceNode(GovernanceActivity<?,?> governanceActivity,
                             JobNode parallelNodeOwner)
Creates a new JobNode contained in this JobSequence for the GovernanceActivity.

Parameters:
governanceActivity - GovernanceActivity.
parallelNodeOwner - JobNode that is the parallel owner of the new JobNode.
Returns:
New JobNode.

jobNodeComplete

void jobNodeComplete(JobNode jobNode,
                     JobNodeActivateSet activateSet,
                     TeamIdentifier currentTeam)
Flags that the input JobNode has completed.

Parameters:
jobNode - JobNode that has completed.
activateSet - JobNodeActivateSet to add JobNode instances waiting on this JobSequence if all JobNode instances of this JobSequence are complete.
currentTeam - TeamIdentifier of the current Team completing the JobNode.

getThreadState

ThreadState getThreadState()
Obtains the ThreadState containing this JobSequence.

Returns:
ThreadState containing this JobSequence.


Copyright © 2005-2013. All Rights Reserved.