MicroTAPAS.mobility
Class MobilityAgent1

java.lang.Object
  |
  +--MicroTAPAS.MicroActor
        |
        +--MicroTAPAS.mobility.MobilitySupportActor
              |
              +--MicroTAPAS.mobility.MobilityAgent1
All Implemented Interfaces:
ControlInterface, MicroActorInterface, java.io.Serializable

public class MobilityAgent1
extends MicroTAPAS.mobility.MobilitySupportActor

This class implements specialized functionality for handling Mobility Agent tasks.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class MicroTAPAS.MicroActor
context, debug, properties
 
Constructor Summary
MobilityAgent1()
          Constructor
 
Method Summary
 RequestResult actorEntry(RequestPars rp)
          Common enrty point of this actor to invoke some activity from outside
 void cleanUp()
           
 RequestResult control(java.lang.String command, java.lang.String[] pars)
          Controls this entity through text commands and paramters.
 boolean getConnected()
          Returns the connection status of this entity
 java.util.Vector getPingNodes()
          Returns a vector of pingable nodes
 void init(ActorContext pAC)
          To leave constructor empty, this method is used to initialize Object data
 RequestResult mobilityActorEntry(RequestPars pRP)
          Common enrty point of this actor to invoke some activity from outside
 void setConnected(boolean pIsConnected, Node pNode)
          Method that allows changing the connection status.
 void start()
          Starts this entity
 Item status()
          Status report of this entity in Item hierarchy of information elements.
 void term()
          Gives this actor a chance to clean up before closing down.
 void terminalMoveLocation(java.lang.String oldNode, java.lang.String newNode)
          Method to handle the detected moving of a terminal, i.e. that a terminal has received a new IP address.
 
Methods inherited from class MicroTAPAS.MicroActor
getGAI, terminalMove
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MobilityAgent1

public MobilityAgent1()
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 MicroTAPAS.mobility.MobilitySupportActor
Parameters:
pAC - context data for this actor

start

public void start()
Starts this entity

Specified by:
start in interface MicroActorInterface
Overrides:
start in class MicroTAPAS.mobility.MobilitySupportActor

control

public RequestResult control(java.lang.String command,
                             java.lang.String[] pars)
                      throws java.lang.Exception
Controls this entity through text commands and paramters. This method can be called i.e. from the debug window. If a request can not be handled here, it is forwarded to the parent object. Specialized functionality should be put in this method.

Specified by:
control in interface ControlInterface
Overrides:
control in class MicroTAPAS.mobility.MobilitySupportActor
Parameters:
command - the command to be performed
Returns:
TAPAS style result indication of the operation
java.lang.Exception

mobilityActorEntry

public RequestResult mobilityActorEntry(RequestPars pRP)
Common enrty point of this actor to invoke some activity from outside

Specified by:
mobilityActorEntry in class MicroTAPAS.mobility.MobilitySupportActor
Parameters:
pRP - Parameters for the activity this actorEntry will attempt to carry out
Returns:
Result of the activity this actorEntry attempted to carry out

getPingNodes

public java.util.Vector getPingNodes()
Returns a vector of pingable nodes

Specified by:
getPingNodes in class MicroTAPAS.mobility.MobilitySupportActor

terminalMoveLocation

public void terminalMoveLocation(java.lang.String oldNode,
                                 java.lang.String newNode)
Method to handle the detected moving of a terminal, i.e. that a terminal has received a new IP address. All stored values/parameters/configs should be changed to reflect this change. Only MobilityAgent terminals are allowed to move. Called from MicroPingClient.

Specified by:
terminalMoveLocation in class MicroTAPAS.mobility.MobilitySupportActor
Parameters:
oldNode - The old address.
newNode - The new address.

setConnected

public void setConnected(boolean pIsConnected,
                         Node pNode)
Method that allows changing the connection status. The frame icon will change to indicate connection status.

Specified by:
setConnected in class MicroTAPAS.mobility.MobilitySupportActor
Parameters:
pIsConnected - Boolean indicating whether the specified node is connected.
pNode - The node that has no connection (for MA=this node)

status

public Item status()
Status report of this entity in Item hierarchy of information elements.

Overrides:
status in class MicroTAPAS.mobility.MobilitySupportActor
Returns:
Hierarchy of Item information elements

term

public void term()
Gives this actor a chance to clean up before closing down.

Specified by:
term in interface MicroActorInterface
Overrides:
term in class MicroTAPAS.mobility.MobilitySupportActor

actorEntry

public RequestResult actorEntry(RequestPars rp)
Common enrty point of this actor to invoke some activity from outside

Specified by:
actorEntry in interface MicroActorInterface
Parameters:
rp - Parameters for the activity this actorEntry will attempt to carry out
Returns:
Result of the activity this actorEntry attempted to carry out

getConnected

public boolean getConnected()
Returns the connection status of this entity

Returns:
Connection status. false indicates no connection.

cleanUp

public void cleanUp()
Specified by:
cleanUp in interface ControlInterface