MicroTAPAS.mobility
Class MobilityManager1

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

public class MobilityManager1
extends MobilitySupportActor

This class implements specialized functionality for handling Mobility Management tasks.

See Also:
Serialized Form

Field Summary
protected static boolean DEBUG
          Determines whether debug info to be sent to debug-server
protected static boolean isConnected
           
 MobilityManagerFrame mmFrame
          Frame for displaying updated status-information.
 MobilityRegistryManager mrm
          Manages the mobility registry.
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
MobilityManager1()
          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.
private  RequestResult handleActorMove(RequestPars pRP)
          Handles an actor move request.
 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
private  RequestResult notifyDirectorOfTerminalMove(MobilityRequest mr)
          Sends a TerminalMove request to the Director
 void pln(java.lang.String[] s1, java.lang.String s2)
          Common method to print debug messages to debug frame(s).
protected  RequestResult registerMMNode(GAI receiver)
          Register this MM at another MM
protected  void registerMMNodeCancel()
          Method to send NodeRegisterCancel to all registered MM's.
protected  RequestResult requestToActor(RequestPars pRP)
          Common method for most types of requests from actors to other actors
private  RequestResult sendNodeRegisterRequest(GAI receiver)
          Sends a NodeRegisterRequest to the indicated node (MM or MA).
 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.
 
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

mrm

public MobilityRegistryManager mrm
Manages the mobility registry.


mmFrame

public MobilityManagerFrame mmFrame
Frame for displaying updated status-information.


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

MobilityManager1

public MobilityManager1()
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

terminalMoveLocation

public void terminalMoveLocation(java.lang.String oldNode,
                                 java.lang.String newNode)
Method to handle the detected moving of a terminal.

Specified by:
terminalMoveLocation in class MobilitySupportActor

sendNodeRegisterRequest

private RequestResult sendNodeRegisterRequest(GAI receiver)
Sends a NodeRegisterRequest to the indicated node (MM or MA). This occurs if a certain node is not registered with this Manager.

Parameters:
receiver - The receiving node
Returns:
TAPAS style result

notifyDirectorOfTerminalMove

private RequestResult notifyDirectorOfTerminalMove(MobilityRequest mr)
Sends a TerminalMove request to the Director

Parameters:
mr - TAPAS style mobility request
Returns:
TAPAS style result

registerMMNode

protected RequestResult registerMMNode(GAI receiver)
Register this MM at another MM

Parameters:
receiver - The receiver of the registration
Returns:
TAPAS-style request result

registerMMNodeCancel

protected void registerMMNodeCancel()
Method to send NodeRegisterCancel to all registered MM's.


handleActorMove

private RequestResult handleActorMove(RequestPars pRP)
Handles an actor move request.


pln

public void pln(java.lang.String[] s1,
                java.lang.String s2)
Common method to print debug messages to debug frame(s).

Parameters:
s1 - Info about where the message is from.
s2 - The debug/info message.

setConnected

public void setConnected(boolean pIsConnected,
                         Node pNode)
Method that allows changing the 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.