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 MobilitySupportActor

See Also:
Serialized Form

Field Summary
protected static boolean DEBUG
          Determines whether debug info to be sent to debug-server
protected static boolean isConnected
           
protected  Node node
          Object to hold information about THIS node
protected  java.lang.String nodeID
          Unique ID for this terminal
protected static MicroPingClient pc
           
protected static MicroPingServer ps
           
protected  GAI registryGAI
          Address of the registry where this node is registered
 
Fields inherited from class MicroTAPAS.MicroActor
bf, context, debug, fh, 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
private  void locateNewMM(java.lang.String oldNode, java.lang.String newNode)
           
 RequestResult mobilityActorEntry(RequestPars pRP)
          Common enrty point of this actor to invoke some activity from outside
private  RequestResult registerNode()
          Method to register this node with MM.
protected  RequestResult registerNodeCancel()
          Method method to RegisterNodeCancel this node with MM.
protected  RequestResult requestToActor(RequestPars pRP)
          Common method for most types of requests from actors to other actors
 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
findRoleSession, getGAI, terminalMove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

protected static final boolean DEBUG
Determines whether debug info to be sent to debug-server

See Also:
Constant Field Values

registryGAI

protected GAI registryGAI
Address of the registry where this node is registered


nodeID

protected java.lang.String nodeID
Unique ID for this terminal


pc

protected static MicroPingClient pc

ps

protected static MicroPingServer ps

isConnected

protected static boolean isConnected

node

protected Node node
Object to hold information about THIS node

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 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 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 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 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 MobilitySupportActor

registerNode

private RequestResult registerNode()
Method to register this node with MM.


registerNodeCancel

protected RequestResult registerNodeCancel()
Method method to RegisterNodeCancel this node with MM.


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 MobilitySupportActor
Parameters:
oldNode - The old address.
newNode - The new address.

locateNewMM

private void locateNewMM(java.lang.String oldNode,
                         java.lang.String newNode)

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 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 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 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.

requestToActor

protected RequestResult requestToActor(RequestPars pRP)
Common method for most types of requests from actors to other actors

Parameters:
pRP - The request
Returns:
TAPAS style result of the request

cleanUp

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


The Telematics Architecture for Plug-and-Play Systems (TAPAS) is a research project undertaken by the Norwegian University of Science and Technology's Telematics department which aims at developing an architecture for network-based service systems with a) flexibility and adaptability, b) robustness and survivability, and c) QoS awareness and resource control.

More information can be found at the project's homepage at http://tapas.item.ntnu.no and the project manager, Professor Finn Arve Aagesen, can be reached at finn.arve.aagesen@item.ntnu.no.