All Packages Class Hierarchy This Package Previous Next Index
Class calypso.core.connmanager.ConnectionManager
java.lang.Object
|
+----java.rmi.server.RemoteObject
|
+----java.rmi.server.RemoteServer
|
+----java.rmi.server.UnicastRemoteObject
|
+----calypso.core.connmanager.ConnectionManager
- public class ConnectionManager
- extends UnicastRemoteObject
- implements ConnectionManagerInterface
Implementation of the Calypso Connection Manager. This class
is a Singleton, so there can be only one connection manager at a
time.
- Author:
- Jukka Aro / TCM Laboratory / HUT
- See Also:
- ConnectionManagerInterface
-
addMCConnection(MCConnectionDescr)
- Adds a new multicast connection descriptor to the hashtable
containing all MC connections over the switch.
-
addPPConnection(PPConnectionDescr)
- Adds a new point-to-point connection descriptor to the hashtable
containing all PP connections over the switch.
-
closeMCConnection(MCConnectionDescr)
- Closes a multicast connection.
-
closePPConnection(PPConnectionDescr)
- Closes a point-to-point connection.
-
createMCConnection(InetAddress)
- Creates a new multicast connection
-
createPPConnection(InetAddress, InetAddress)
- Creates a new point-to-point connection
-
getMCConnectionDescr(Long)
- Fetches a multicast connection descriptor.
-
getMCConnectionDescrs()
- Fetches descriptors for all multicast connections over the switch.
-
getNextConnID()
-
-
getPPConnectionDescr(Long)
- Fetches a point-to-point connection descriptor.
-
getPPConnectionDescrs()
- Fetches descriptors for all point-to-point connections over the switch.
-
hasMCKey(Long)
- Tests if the hashtable containing all multicast connections
over the switch has the specified long as a key.
-
hasPPKey(Long)
- Tests if the hashtable containing all point-to-point connections
over the switch has the specified long as a key.
-
init()
- Initializes the Connection Manager
-
instance()
- Returns a reference to the only ConnectionManager instance in
existence
-
registerPartialMCConnection(Long, VPIVCI, InetAddress, InetAddress, VCPoint)
-
-
registerPartialPPConnection(Long, int, VPIVCI, InetAddress)
- Creates a partial point-to-point connection (adds one leg to an
existing connection).
-
setupMCConnection(Long, VPIVCI, InetAddress, InetAddress, VCPoint)
-
init
public static void init()
- Initializes the Connection Manager
instance
public static ConnectionManager instance()
- Returns a reference to the only ConnectionManager instance in
existence
- Returns:
- Reference to the ConnectionManager class instance
getNextConnID
protected static int getNextConnID()
- Returns:
- Next connection ID number
hasPPKey
public boolean hasPPKey(Long id_)
- Tests if the hashtable containing all point-to-point connections
over the switch has the specified long as a key.
- Parameters:
- id_ - Long to be searched for among the keys in the
PPDescrs hashtable
- Returns:
-
true
if the specified object is a key in
the PPDescrs hashtable; false
otherwise.
hasMCKey
public boolean hasMCKey(Long id_)
- Tests if the hashtable containing all multicast connections
over the switch has the specified long as a key.
- Parameters:
- id_ - Long to be searched for among the keys in the
MCDescrs hashtable
- Returns:
-
true
if the specified object is a key in
the MCDescrs hashtable; false
otherwise.
createPPConnection
public VCConnectionDescr createPPConnection(InetAddress IP1_,
InetAddress IP2_) throws RemoteException, SwitchException
- Creates a new point-to-point connection
- Parameters:
- IP1_ - Router's IP address
- IP2_ - Client's IP address
- Returns:
- PPConnectionDescr describing the new connection
- Throws: RemoteException
- If some problems with the remote connection occur.
- Throws: SwitchException
- If IP addresses are not found in routing table.
registerPartialPPConnection
public PPConnectionDescr registerPartialPPConnection(Long connID_,
int oPort_,
VPIVCI oVCC_,
InetAddress dest_) throws RemoteException, SwitchException
- Creates a partial point-to-point connection (adds one leg to an
existing connection).
- Parameters:
- connID_ - Identity number of the connection descriptor
- oPort_ - Port number on the router's side of the switch
- oVCC_ - VPI/VCI pair on the router's side of the switch
- dest_ - Router's IP address
- Returns:
- PPConnectionDescr describing the new connection
- Throws: RemoteException
- If some problems with the remote connection occur.
- Throws: SwitchException
- If IP addresses are not found in routing table.
createMCConnection
public VCConnectionDescr createMCConnection(InetAddress IP1_) throws RemoteException, SwitchException
- Creates a new multicast connection
- Parameters:
- IP1_ - Router's IP address
- Returns:
- MCConnectionDescr describing the new connection
- Throws: RemoteException
- If some problems with the remote connection occur.
- Throws: SwitchException
- If router's IP address is not found in routing table.
setupMCConnection
public void setupMCConnection(Long connID_,
VPIVCI oVCC_,
InetAddress dest_,
InetAddress clientIP_,
VCPoint outPoint_)
registerPartialMCConnection
public MCConnectionDescr registerPartialMCConnection(Long connID_,
VPIVCI oVCC_,
InetAddress dest_,
InetAddress clientIP_,
VCPoint outPoint_)
addPPConnection
public void addPPConnection(PPConnectionDescr ppcd_) throws RemoteException
- Adds a new point-to-point connection descriptor to the hashtable
containing all PP connections over the switch.
- Parameters:
- ppcd_ - PP connection descriptor to be added
- Throws: RemoteException
- If some problems with the remote connection occur.
addMCConnection
public void addMCConnection(MCConnectionDescr mccd_) throws RemoteException
- Adds a new multicast connection descriptor to the hashtable
containing all MC connections over the switch.
- Parameters:
- mccd_ - MC connection descriptor to be added
- Throws: RemoteException
- If some problems with the remote connection occur.
getPPConnectionDescr
public PPConnectionDescr getPPConnectionDescr(Long connID)
- Fetches a point-to-point connection descriptor.
- Parameters:
- connID - Long representing the ID number of the connection to
be fetched
- Returns:
- PPConnectionDescr that matches the ID number
getPPConnectionDescrs
public Enumeration getPPConnectionDescrs()
- Fetches descriptors for all point-to-point connections over the switch.
- Returns:
- java.util.Enumeration of point-to-point connection descriptors
getMCConnectionDescr
public MCConnectionDescr getMCConnectionDescr(Long connID_)
- Fetches a multicast connection descriptor.
- Parameters:
- connID - Long representing the ID number of the connection to
be fetched
- Returns:
- MCConnectionDescr that matches the ID number
getMCConnectionDescrs
public Enumeration getMCConnectionDescrs()
- Fetches descriptors for all multicast connections over the switch.
- Returns:
- java.util.Enumeration of multicast connection descriptors
closePPConnection
protected void closePPConnection(PPConnectionDescr ppcd_) throws RemoteException
- Closes a point-to-point connection. This method can be called by
a point-to-point connection descriptor only and is therefore
declared protected. The connection is removed from the hashtable
of the Connection Manager.
- Parameters:
- ppcd_ - PP Connection descriptor of the connection to be
closed
closeMCConnection
protected void closeMCConnection(MCConnectionDescr mccd_) throws RemoteException
- Closes a multicast connection. This method can be called by
a multicast connection descriptor only and is therefore
declared protected. The connection is removed from the hashtable
of the Connection Manager.
- Parameters:
- mccd_ - MC Connection descriptor of the connection to be
closed
All Packages Class Hierarchy This Package Previous Next Index