MicroTAPAS
Class MicroActorManager

java.lang.Object
  |
  +--MicroTAPAS.MicroActorManager
All Implemented Interfaces:
java.io.Serializable

public class MicroActorManager
extends java.lang.Object
implements java.io.Serializable

Manages active Actors within one TAPAS node, MicroPNES has one instance of it.

See Also:
Serialized Form

Constructor Summary
MicroActorManager()
          Initializes data fields
 
Method Summary
 MicroActor actorGet(GAI keyGAI)
          Get actors from this manager
 int actorPut(MicroActor actor)
          Saves actors in this manager
 MicroActor actorRemove(java.lang.String key)
          Removes actors from this manager
 boolean empty()
          Simple utility to determine if there are active actors
 Item listActors()
          Lists all actors this manager holds for debug purposes
 void terminalMove(java.lang.String oldNode, java.lang.String newNode)
          Method to update all relevant properties once a terminal has moved.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MicroActorManager

public MicroActorManager()
Initializes data fields

Method Detail

empty

public boolean empty()
Simple utility to determine if there are active actors

Returns:
true if there are no more active actors in this manager

actorPut

public int actorPut(MicroActor actor)
Saves actors in this manager

Parameters:
actor - The actor to be saved
Returns:
1 if actor is already saved, 2 if NullPointerException, 0 if actor saved ok

actorRemove

public MicroActor actorRemove(java.lang.String key)
Removes actors from this manager

Parameters:
key - GAI string of the actor to be removed
Returns:
The removed actor

actorGet

public MicroActor actorGet(GAI keyGAI)
Get actors from this manager

Parameters:
keyGAI - GAI value of the actor to be found
Returns:
The actor

terminalMove

public void terminalMove(java.lang.String oldNode,
                         java.lang.String newNode)
Method to update all relevant properties once a terminal has moved. Called by MicroPNES.

Parameters:
oldNode - The old node
newNode - The new node

listActors

public Item listActors()
Lists all actors this manager holds for debug purposes

Returns:
Actors listed in a String array