org.mobicents.tools.sip.balancer
Class NodeRegisterImpl

java.lang.Object
  extended by org.mobicents.tools.sip.balancer.NodeRegisterImpl
All Implemented Interfaces:
java.rmi.Remote, NodeRegister

public class NodeRegisterImpl
extends java.lang.Object
implements NodeRegister

This is the placeholder for maintening information about alive nodes and the relation between a Call-Id and its attributed node.

Author:
M. Ranganathan, baranowb, Jean Deruelle

Field Summary
static int POINTER_START
           
 
Constructor Summary
NodeRegisterImpl(java.net.InetAddress serverAddress)
           
 
Method Summary
 void forceRemovalInRegister(java.util.ArrayList<SIPNode> ping)
          
 java.net.InetAddress getAddress()
          
 SIPNode getGluedNode(java.lang.String callID)
          
 java.util.Map<java.lang.String,SIPNode> getGluedSessions()
          
 SIPNode getNextNode()
          
 SIPNode getNode(java.lang.String host, int port, java.lang.String transport)
          
 long getNodeExpiration()
          
 long getNodeExpirationTaskInterval()
          
 java.util.List<SIPNode> getNodes()
          
 void handlePingInRegister(java.util.ArrayList<SIPNode> ping)
          
 boolean isSIPNodePresent(java.lang.String host, int port, java.lang.String transport)
          
 void setNodeExpiration(long value)
          
 void setNodeExpirationTaskInterval(long value)
          
 boolean startRegistry(int rmiRegistryPort)
          
 SIPNode stickSessionToNode(java.lang.String callID, SIPNode sipNode)
          
 boolean stopRegistry()
          
 void unStickSessionFromNode(java.lang.String callID)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POINTER_START

public static final int POINTER_START
See Also:
Constant Field Values
Constructor Detail

NodeRegisterImpl

public NodeRegisterImpl(java.net.InetAddress serverAddress)
                 throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException
Method Detail

getNodes

public java.util.List<SIPNode> getNodes()


startRegistry

public boolean startRegistry(int rmiRegistryPort)


stopRegistry

public boolean stopRegistry()


unStickSessionFromNode

public void unStickSessionFromNode(java.lang.String callID)

Specified by:
unStickSessionFromNode in interface NodeRegister

getNextNode

public SIPNode getNextNode()

Specified by:
getNextNode in interface NodeRegister

stickSessionToNode

public SIPNode stickSessionToNode(java.lang.String callID,
                                  SIPNode sipNode)

Specified by:
stickSessionToNode in interface NodeRegister

getGluedNode

public SIPNode getGluedNode(java.lang.String callID)

Specified by:
getGluedNode in interface NodeRegister

isSIPNodePresent

public boolean isSIPNodePresent(java.lang.String host,
                                int port,
                                java.lang.String transport)

Specified by:
isSIPNodePresent in interface NodeRegister

getNode

public SIPNode getNode(java.lang.String host,
                       int port,
                       java.lang.String transport)

Specified by:
getNode in interface NodeRegister

handlePingInRegister

public void handlePingInRegister(java.util.ArrayList<SIPNode> ping)

Specified by:
handlePingInRegister in interface NodeRegister

forceRemovalInRegister

public void forceRemovalInRegister(java.util.ArrayList<SIPNode> ping)

Specified by:
forceRemovalInRegister in interface NodeRegister

getAddress

public java.net.InetAddress getAddress()


getNodeExpiration

public long getNodeExpiration()


getNodeExpirationTaskInterval

public long getNodeExpirationTaskInterval()


setNodeExpiration

public void setNodeExpiration(long value)
                       throws java.lang.IllegalArgumentException

Throws:
java.lang.IllegalArgumentException

setNodeExpirationTaskInterval

public void setNodeExpirationTaskInterval(long value)


getGluedSessions

public java.util.Map<java.lang.String,SIPNode> getGluedSessions()



Copyright © 2009. All Rights Reserved.