org.hypergraphdb.peer.workflow
Class WorkflowStateConstant

java.lang.Object
  extended by org.hypergraphdb.peer.workflow.WorkflowState
      extended by org.hypergraphdb.peer.workflow.WorkflowStateConstant

public class WorkflowStateConstant
extends WorkflowState


Field Summary
 
Fields inherited from class org.hypergraphdb.peer.workflow.WorkflowState
Canceled, Completed, Failed, Limbo, Started
 
Method Summary
 void addListener(StateListener l)
           
 void assign(WorkflowStateConstant arg0)
           Set a new state value.
 boolean compareAndAssign(WorkflowStateConstant arg0, WorkflowStateConstant arg1)
           Moves to a new state (newState) if the current state is equal to a given state (oldState)
 void removeListener(StateListener l)
           
 
Methods inherited from class org.hypergraphdb.peer.workflow.WorkflowState
equals, getConst, hashCode, isCanceled, isCompleted, isFailed, isFinished, isInLimbo, isStarted, makeState, makeState, makeStateConstant, setCanceled, setCompleted, setFailed, setStarted, toStateConstant, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

addListener

public void addListener(StateListener l)
Overrides:
addListener in class WorkflowState

assign

public void assign(WorkflowStateConstant arg0)
Description copied from class: WorkflowState

Set a new state value.

Overrides:
assign in class WorkflowState

compareAndAssign

public boolean compareAndAssign(WorkflowStateConstant arg0,
                                WorkflowStateConstant arg1)
Description copied from class: WorkflowState

Moves to a new state (newState) if the current state is equal to a given state (oldState)

Overrides:
compareAndAssign in class WorkflowState
Parameters:
arg0 - The presumed current state.
arg1 - The new state.
Returns:
true if the change was made and false otherwise.

removeListener

public void removeListener(StateListener l)
Overrides:
removeListener in class WorkflowState