MicroTAPAS.mobility
Class MobilityApplicationActor

java.lang.Object
  |
  +--MicroTAPAS.MicroActor
        |
        +--MicroTAPAS.MicroApplicationActor
              |
              +--MicroTAPAS.mobility.MobilityApplicationActor
All Implemented Interfaces:
ControlInterface, MicroActorInterface, java.io.Serializable
Direct Known Subclasses:
MicroTester.v2_0.MicroTesterBase, MicroTesterServer

public abstract class MobilityApplicationActor
extends MicroApplicationActor
implements java.io.Serializable

This abstract class adds a layer of mobility to the actor hierarchy

See Also:
Serialized Form

Field Summary
 
Fields inherited from class MicroTAPAS.MicroActor
context, debug, properties
 
Constructor Summary
MobilityApplicationActor()
          Constructor
 
Method Summary
 RequestResult actorChangeBehaviour(java.lang.String pRoleId, java.lang.Object ai)
          Request to perform an actor change behaviour for own actor.
 RequestResult actorChangeBehaviour(java.lang.String pRoleId, java.lang.String[] pars)
          Deprecated. Replaced by actorChangeBehaviour(String, Object)
 RequestResult actorMove(GAI moveTo)
          Received from CapsMonitorAgent when the offered capabilites of this node has become 'less' than the required capabilites for this actor, or as a explicit command.
 RequestResult applicationActorEntry(RequestPars pRP)
          Common entry point for all actors of this type
 void cleanUp()
          Gives this Actor instance a chance to clean up when the DebugWindow is closed.
 RequestResult control(java.lang.String cmd, java.lang.String[] pars)
          Overloaded mehtod that controls the actor, invokes its functionality, BaseFrame input field can trigger it, as can RoleSessionActions, or the ScriptHandler.
abstract  void createInterface(java.lang.Object actorInterface)
          Mehtod that enables the (re-)creation of an interface at an actor.
abstract  java.lang.Object getInterface()
          Method to retrieve the interface of an actor.
 GAI getMAGAI()
           
 GAI getMMGAI()
           
 Item help()
          Method to display a hierarchy of available commands
 void init(ActorContext pAC)
          To leave constructor empty, this method is used to initialize Object data
abstract  RequestResult mobilityActorEntry(RequestPars rp)
          Common entry point for all actors who subclass this class.
 Item status()
          Report this actor's status through Item elements
 void term()
          Terminate method from the ActorInterface.
 
Methods inherited from class MicroTAPAS.MicroApplicationActor
actorBehaviourPlugIn, actorBehaviourPlugOut, ActorCapabilities, actorEntry, ActorPlay, actorPlugIn, actorPlugOut, anyOtherRequestType, closeBF, playChangesPlugIn, playPlugIn, playPlugOut, RoleSessionAction, subscribeCancel, subscribeReport, subscribeRequest
 
Methods inherited from class MicroTAPAS.MicroActor
getGAI, start, terminalMove
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MobilityApplicationActor

public MobilityApplicationActor()
Constructor

Method Detail

init

public void init(ActorContext pAC)
To leave constructor empty, this method is used to initialize Object data

Overrides:
init in class MicroApplicationActor
Parameters:
pAC - context data for this actor

mobilityActorEntry

public abstract RequestResult mobilityActorEntry(RequestPars rp)
                                          throws java.lang.Exception
Common entry point for all actors who subclass this class.

java.lang.Exception

createInterface

public abstract void createInterface(java.lang.Object actorInterface)
Mehtod that enables the (re-)creation of an interface at an actor.


getInterface

public abstract java.lang.Object getInterface()
Method to retrieve the interface of an actor.


getMAGAI

public GAI getMAGAI()

getMMGAI

public GAI getMMGAI()

control

public RequestResult control(java.lang.String cmd,
                             java.lang.String[] pars)
                      throws java.lang.Exception
Overloaded mehtod that controls the actor, invokes its functionality, BaseFrame input field can trigger it, as can RoleSessionActions, or the ScriptHandler.

Specified by:
control in interface ControlInterface
Overrides:
control in class MicroApplicationActor
Parameters:
cmd - First command line argument, used to denote a command name.
Returns:
PaP style result indication of the operation.
java.lang.Exception

applicationActorEntry

public RequestResult applicationActorEntry(RequestPars pRP)
                                    throws java.lang.Exception
Common entry point for all actors of this type

Specified by:
applicationActorEntry in class MicroApplicationActor
Returns:
TAPAS style result
java.lang.Exception

actorChangeBehaviour

public RequestResult actorChangeBehaviour(java.lang.String pRoleId,
                                          java.lang.String[] pars)
                                   throws java.lang.Exception
Deprecated. Replaced by actorChangeBehaviour(String, Object)

Request to perform an actor change behaviour for own actor. The new role for the actor will be according to what is specified, and the set of parameters will be withdrawn to the upgraded actor.

Overrides:
actorChangeBehaviour in class MicroApplicationActor
Parameters:
pRoleId - New role to be assigned to actor
pars - The data withdraw from existing to upgraded actor
Returns:
Result of the performed request
java.lang.Exception

actorChangeBehaviour

public RequestResult actorChangeBehaviour(java.lang.String pRoleId,
                                          java.lang.Object ai)
                                   throws java.lang.Exception
Request to perform an actor change behaviour for own actor. The new role for the actor will be according to what is specified, and the actors interface will be withdrawn and plugged into the upgraded actor.

Overrides:
actorChangeBehaviour in class MicroApplicationActor
Parameters:
pRoleId - New role to be assigned to actor
ai - The actor interface
Returns:
Result of the performed request
java.lang.Exception

actorMove

public RequestResult actorMove(GAI moveTo)
Received from CapsMonitorAgent when the offered capabilites of this node has become 'less' than the required capabilites for this actor, or as a explicit command.

Parameters:
moveTo - New GAI of actor after move
Returns:
TAPAS-style result

cleanUp

public void cleanUp()
Gives this Actor instance a chance to clean up when the DebugWindow is closed.

Specified by:
cleanUp in interface ControlInterface

term

public void term()
Description copied from class: MicroActor
Terminate method from the ActorInterface. Closes the debug window

Specified by:
term in interface MicroActorInterface
Overrides:
term in class MicroActor

status

public Item status()
Report this actor's status through Item elements

Overrides:
status in class MicroActor
Returns:
Whatever context.status() returns

help

public Item help()
Method to display a hierarchy of available commands

Overrides:
help in class MicroApplicationActor