org.apache.agila.impl
Class TokenImpl

java.lang.Object
  extended by org.apache.agila.impl.TokenImpl
All Implemented Interfaces:
Token

public class TokenImpl
extends java.lang.Object
implements Token

Version:
$Id: $
Author:
Geir Magnusson Jr.

Field Summary
 
Fields inherited from interface org.apache.agila.engine.Token
MID, POST, PRE
 
Constructor Summary
TokenImpl()
           
 
Method Summary
 NodeID getCurrentNodeID()
          return the node ID that this token is pointing at
 int getCurrentState()
          Return the current state of the token - where in the node it's pointing
 InstanceID getInstanceID()
          return the process instance ID for which this token is associated
 TokenID getTokenID()
          returns the unique ID of this token
 boolean isActive()
          returns the active/inactive status of the token.
 void setActive(boolean active)
           
 void setCurrentNodeID(NodeID currentNodeId)
          Sets the nodeid for this token
 void setCurrentState(int currentState)
          Sets the current state of the token
 void setInstanceID(InstanceID instanceId)
           
 void setTokenID(TokenID tokenID)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TokenImpl

public TokenImpl()
Method Detail

getInstanceID

public InstanceID getInstanceID()
Description copied from interface: Token
return the process instance ID for which this token is associated

Specified by:
getInstanceID in interface Token
Returns:
instance associated with this token

setInstanceID

public void setInstanceID(InstanceID instanceId)

getCurrentNodeID

public NodeID getCurrentNodeID()
Description copied from interface: Token
return the node ID that this token is pointing at

Specified by:
getCurrentNodeID in interface Token
Returns:
current node id for this token

setCurrentNodeID

public void setCurrentNodeID(NodeID currentNodeId)
Description copied from interface: Token
Sets the nodeid for this token

Specified by:
setCurrentNodeID in interface Token

getCurrentState

public int getCurrentState()
Description copied from interface: Token
Return the current state of the token - where in the node it's pointing

Specified by:
getCurrentState in interface Token
Returns:
current state (PRE | MID | POST)

setCurrentState

public void setCurrentState(int currentState)
Description copied from interface: Token
Sets the current state of the token

Specified by:
setCurrentState in interface Token

isActive

public boolean isActive()
Description copied from interface: Token
returns the active/inactive status of the token. Active means it's the current 'state pointer' for the thread of execution that it's a part of

Specified by:
isActive in interface Token
Returns:
true if token is active for this instance, false otherwise

setActive

public void setActive(boolean active)
Specified by:
setActive in interface Token

getTokenID

public TokenID getTokenID()
Description copied from interface: Token
returns the unique ID of this token

Specified by:
getTokenID in interface Token
Returns:
id of the token

setTokenID

public void setTokenID(TokenID tokenID)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2004-2005 The Apache Software Foundation. All Rights Reserved.