|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--MicroTAPAS.mobility.MobilityRegistryManager
Manages and operates node registries for a Mobility entity.
The class contains four registers:
Node registry (nReg)
Assigned address registry (aReg)
Forward address registry (fReg)
Actor routing table (actReg)
The implementation includes methods to access and set information in the
various registries.
Node,
Serialized Form| Field Summary | |
private static java.util.Hashtable |
actReg
Hashtable to contain the routing table for actors. |
private static java.util.Hashtable |
aReg
Hashtables that contains the assigned address registry. |
private static boolean |
DEBUG
Determines whether debug info to be sent to debug-server. |
private static java.util.Hashtable |
fReg
Hashtables that contains the forward address registry. |
private java.lang.String |
nodeID
Unique node ID |
private static java.util.Hashtable |
nReg
Hashtables that contains the node registry. |
MobilityManager1 |
parent
Reference to parent object. |
| Constructor Summary | |
MobilityRegistryManager(MobilityManager1 pParent,
java.lang.String id)
Constructor |
|
| Method Summary | |
RequestResult |
actorDiscovery(RequestPars rp)
This method discovers an actor in the registry. |
RequestResult |
actorMove(GAI oldGAI,
GAI newGAI)
Method to delete an actor entry in the actor registry when an actor has moved to a different node. |
RequestResult |
actorRegister(RequestPars rp)
Registers an actor with the actor's node registry. |
RequestResult |
actorRegisterCancel(RequestPars rp)
Removes an actor from the registry. |
RequestResult |
actorRegisterMove(RequestPars pRP)
Method to delete an actor entry in the actor registry when an actor has moved to a different node. |
Item |
actRegStatus()
Returns the status of the registry as an Item hierarchy of elements. |
RequestResult |
addLocalAssigned(java.lang.String ips,
boolean doUpdate)
Method to add new IP(s) to local domain (this MM's domain). |
RequestResult |
addNode(Node node,
java.util.Vector ips,
boolean doUpdate)
Method to add a node to the registries. |
private RequestResult |
addressUpdate(RequestPars rp,
java.util.Hashtable reg)
Performs a update on a address registry by comparing addresses received from foreign MM by locally registered ones and add those that are missing locally. |
Item |
aRegStatus()
Returns the status of the registry as an Item hierarchy of elements. |
private java.util.Vector |
assignedIPCheck(java.util.Vector v)
Method to check whether an assigned ip is already registered, both locally and all registered MM's. |
private RequestResult |
assignedUpdate(RequestPars rp)
Updates the local assigned address registry, and returns a Hashtable containing those addresses the sender did not have in its request. |
private void |
clearForward(java.lang.String sNode)
Removes ALL forward references for a certain node (when node is shut down). |
private RequestResult |
forwardUpdate(RequestPars rp)
Updates the local forward address registry, and returns a Hashtable containing those addresses the sender did not have in its request. |
Item |
fRegStatus()
Returns the status of the registry as an Item hierarchy of elements. |
java.util.Vector |
getAllDirectors()
Method to find all the Directors who are registered at this node. |
java.util.Vector |
getAllNodes()
Method to return a vector of Nodes that can be pinged (not itself). |
private java.util.Vector |
getAssignedIPs()
Method to fetch all the assigned IP's registered at this node |
private java.lang.String |
getAssignedNodeID(java.lang.String sNode)
Locates an assigned node's node-ID based on it's node address. |
GAI |
getDirectorGAI(java.lang.String sNode)
Method to find the Director of a particular node |
private java.lang.String |
getForwardNodeID(java.lang.String sNode)
Locates a forward node's node-ID based on it's node address. |
java.util.Vector |
getLocalIPs()
Method to find all locally assigned IP's. |
private java.lang.String |
getMMNode(java.lang.String id)
Finds the id of the current managing node of a moved node. |
java.util.Vector |
getMMNodes()
Method to return a vector of MM nodes. |
private java.util.Hashtable |
getMMNodesID()
Method to return a Hashtable of MM nodes[id, mmGAI]. |
Node |
getNode(java.lang.String id)
Method to safely get a node from the node registry. |
java.util.Vector |
getPingNodes()
Method to return a vector of Nodes that can be pinged (not itself). |
Item |
listActors()
Returns all registered actors as an Item hierarchy of elements. |
RequestResult |
mmDiscovery(RequestPars rp)
Discovers a MobilityManager (searches only local registry). |
RequestResult |
mobilitySync(RequestPars rp)
Method to handle mobility synchronization: -ASSIGNED_UPDATE handles the update of the assigned address registry. |
RequestResult |
nodeDiscovery(RequestPars rp)
Handles incomming NodeDiscovery requests from foreign MM's. |
boolean |
nodeValidate(GAI mobGAI)
Checks if a node is previously registered. |
Item |
nRegStatus()
Returns the status of the registry as an Item hierarchy of elements. |
private RequestResult |
performActorUpdate(RequestPars pRP)
Relays a request to all the registered MM's in the network. |
private java.util.Hashtable |
performAddressUpdate(java.lang.String syncType,
java.util.Hashtable reg)
Performs update on an address registry by sending requests to all registered MM nodes. |
private void |
performAssignedUpdate()
Performs an assigned address update to all registered nodes. |
private void |
performForwardUpdate()
Performs an forward address update to all registered nodes. |
private void |
printHT(java.lang.String heading,
java.util.Hashtable ht)
Method to print the contents of a Hashtable consisting of |
RequestResult |
removeLocalIP(java.lang.String ip)
Method to remove an assigned local IP from the registry. |
RequestResult |
removeNode(Node node,
boolean doUpdate)
Method to remove a node from the relevnat registries. |
void |
setConnected(boolean isConnected,
Node pNode)
Updates the connection status of a particular node. |
Item |
status()
Status report of MobilitySupportActor in Item hierarchy of information elements. |
boolean |
terminalMove(java.lang.String oldNode,
java.lang.String newNode,
Node node)
The indicated node has changed location, and relevnat registries must be updated. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final boolean DEBUG
public MobilityManager1 parent
private static java.util.Hashtable aReg
private static java.util.Hashtable fReg
private static java.util.Hashtable nReg
private static java.util.Hashtable actReg
private java.lang.String nodeID
| Constructor Detail |
public MobilityRegistryManager(MobilityManager1 pParent,
java.lang.String id)
| Method Detail |
public RequestResult addNode(Node node,
java.util.Vector ips,
boolean doUpdate)
node - The node to be added/updated.ips - The node's initially assigned IP's
public RequestResult removeNode(Node node,
boolean doUpdate)
node - The node to be removed.
public boolean terminalMove(java.lang.String oldNode,
java.lang.String newNode,
Node node)
oldNode - The old node.newNode - The new node.node - The updated node object for moved node.
public void setConnected(boolean isConnected,
Node pNode)
isConnected - Determines if the node is connected or notpNode - The node in question. If pNode = null, the status of the local
node is updated, else that node will be updated.public RequestResult mobilitySync(RequestPars rp)
rp - TAPAS-style request parameter.
public java.util.Vector getMMNodes()
public boolean nodeValidate(GAI mobGAI)
mobGAI - The GAI of the entity to be checked
public java.util.Vector getLocalIPs()
public RequestResult addLocalAssigned(java.lang.String ips,
boolean doUpdate)
ips - Comma-seperated string of IP addresses.
public RequestResult removeLocalIP(java.lang.String ip)
ip - The address to be removed.
public RequestResult actorDiscovery(RequestPars rp)
rp - TAPAS-style request.
public RequestResult mmDiscovery(RequestPars rp)
rp - TAPAS-style request parameter
public Node getNode(java.lang.String id)
id - The id/key of the node.
public RequestResult nodeDiscovery(RequestPars rp)
rp - TAPAS-style request.
public java.util.Vector getPingNodes()
public java.util.Vector getAllNodes()
public GAI getDirectorGAI(java.lang.String sNode)
sNode - The node address of the terminal
public java.util.Vector getAllDirectors()
public RequestResult actorRegister(RequestPars rp)
rp - TAPAS-style request.
public RequestResult actorRegisterCancel(RequestPars rp)
rp - TAPAS-style request.
public RequestResult actorMove(GAI oldGAI,
GAI newGAI)
oldGAI - The old GAI of the actor.newGAI - The new GAI of the actor.
public RequestResult actorRegisterMove(RequestPars pRP)
pRP - TAPAS-style request parameters.
public Item status()
public Item listActors()
public Item nRegStatus()
public Item fRegStatus()
public Item aRegStatus()
public Item actRegStatus()
private RequestResult assignedUpdate(RequestPars rp)
rp - TAPAS-style request parameter
private RequestResult forwardUpdate(RequestPars rp)
rp - TAPAS-style request parameter
private void performAssignedUpdate()
private void performForwardUpdate()
private java.util.Hashtable performAddressUpdate(java.lang.String syncType,
java.util.Hashtable reg)
syncType - The type of synchronization: ASSIGNED_UPDATE or FORWARD_UPDATE.reg - The registry to be updated.
private RequestResult performActorUpdate(RequestPars pRP)
private RequestResult addressUpdate(RequestPars rp,
java.util.Hashtable reg)
rp - TAPAS-syle request parameters.reg - The address registry to perform update on.
private java.util.Vector assignedIPCheck(java.util.Vector v)
throws java.lang.Exception
v - Vector containing all ip's to be checked.
java.lang.Exceptionprivate java.util.Vector getAssignedIPs()
private void clearForward(java.lang.String sNode)
sNode - The node-reference to be removed.private java.lang.String getAssignedNodeID(java.lang.String sNode)
sNode - The node's address.
private java.lang.String getForwardNodeID(java.lang.String sNode)
sNode - The node's address.
private void printHT(java.lang.String heading,
java.util.Hashtable ht)
heading - The heading of the print outht - The hashtable to be printed
private java.util.Hashtable getMMNodesID()
throws java.lang.Exception
java.lang.Exceptionprivate java.lang.String getMMNode(java.lang.String id)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||