net.officefloor.frame.internal.structure
Interface JobNode

All Superinterfaces:
LinkedListSetEntry<JobNode,JobSequence>
All Known Implementing Classes:
AbstractJobContainer, DutyJob, GovernanceJob, TaskJob

public interface JobNode
extends LinkedListSetEntry<JobNode,JobSequence>

Node within the graph of JobNode instances to execute.

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

Author:
Daniel Sagenschneider

Method Summary
 void activateJob(TeamIdentifier currentTeam)
          Activates the Job for this JobNode.
 void clearNodes(JobNodeActivateSet activateSet, TeamIdentifier currentTeam)
          Clears the JobNode instances linked to this JobNode.
 EscalationProcedure getEscalationProcedure()
          Obtains the EscalationProcedure for this JobNode.
 JobSequence getJobSequence()
          Obtains the JobSequence containing this JobNode.
 JobNode getNextNode()
          Obtains the next JobNode in the JobSequence to execute after the current JobNode has completed.
 JobNode getParallelNode()
          Obtains the parallel JobNode to the current JobNode.
 JobNode getParallelOwner()
          Obtains the parallel owner of this JobNode.
 boolean isJobNodeComplete()
          Indicates if this JobNode is completed.
 void setNextNode(JobNode jobNode)
          Specifies the next JobNode in the JobSequence to execute after the current JobNode is completed.
 void setParallelNode(JobNode jobNode)
          Specifies the parallel JobNode to the current JobNode.
 void setParallelOwner(JobNode jobNode)
           Specifies the parallel owner of this JobNode.
 
Methods inherited from interface net.officefloor.frame.internal.structure.LinkedListSetEntry
getLinkedListSetOwner, getNext, getPrev, setNext, setPrev
 

Method Detail

activateJob

void activateJob(TeamIdentifier currentTeam)
Activates the Job for this JobNode.

Parameters:
currentTeam - Current TeamIdentifier that is activating the JobNode. This enables continuing execution with the current Thread should it be the same Team.

isJobNodeComplete

boolean isJobNodeComplete()
Indicates if this JobNode is completed.

Returns:
true if this JobNode is completed.

getJobSequence

JobSequence getJobSequence()
Obtains the JobSequence containing this JobNode. The returned JobSequence provides access to the ThreadState and subsequent ProcessState that this JobNode is involved in.

Returns:
JobSequence containing this JobNode.

getEscalationProcedure

EscalationProcedure getEscalationProcedure()
Obtains the EscalationProcedure for this JobNode.

Returns:
EscalationProcedure for this JobNode.

setParallelOwner

void setParallelOwner(JobNode jobNode)

Specifies the parallel owner of this JobNode.

The input JobNode is executed once the current JobSequence that this JobNode is involved with is complete.

Parameters:
jobNode - Parallel owner of this JobNode.

getParallelOwner

JobNode getParallelOwner()
Obtains the parallel owner of this JobNode.

Returns:
Parallel owner of this JobNode.

setParallelNode

void setParallelNode(JobNode jobNode)
Specifies the parallel JobNode to the current JobNode. The current JobNode will not complete until the input parallel JobNode is complete.

Parameters:
jobNode - Parallel JobNode.

getParallelNode

JobNode getParallelNode()
Obtains the parallel JobNode to the current JobNode.

Returns:
Parallel JobNode to the current JobNode.

setNextNode

void setNextNode(JobNode jobNode)
Specifies the next JobNode in the JobSequence to execute after the current JobNode is completed.

Parameters:
jobNode - Next JobNode.

getNextNode

JobNode getNextNode()
Obtains the next JobNode in the JobSequence to execute after the current JobNode has completed.

Returns:
Next JobNode.

clearNodes

void clearNodes(JobNodeActivateSet activateSet,
                TeamIdentifier currentTeam)
Clears the JobNode instances linked to this JobNode.

Parameters:
activateSet - JobNodeActivateSet.
currentTeam - TeamIdentifier of the current Team clearing the JobNode instances.


Copyright © 2005-2013. All Rights Reserved.