All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class calypso.core.atmswitch.MCConnection

java.lang.Object
   |
   +----calypso.core.atmswitch.VCConnection
           |
           +----calypso.core.atmswitch.MCConnection

public class MCConnection
extends VCConnection
Representation of multicast connection.

MCConnection class provides means to control an existing multicast connection. It allows user to query incoming and outgoing points, the traffic descriptor and the state of this connection. Users can also rebind a connection point to another connection point, release this connection, add a connection point to this connection, and remove a connection point from this connection.

Author:
Juha Pääjärvi / TCM laboratory / HUT

Variable Index

 o DEBUG
DEBUG flag controls if we want to compile debug messages.

Constructor Index

 o MCConnection(VCPoint, TrafficDescr)
Constructs a MCConnectionn object with parameters defining incoming point and traffic properties.

Method Index

 o addOutPoint(VCPoint)
Adds a new outgoing point to this connection.
 o forcedRelease()
Releases this connection.
 o getID()
Returns connection ID of this connection.
 o getInPoint()
Returns the VCPoint object representing the connection point for incoming data.
 o getItemReference()
Returns reference to the item representing this connection in the data structures of Switch class.
 o getOutPoints()
Returns Enumeration object that contains VCPoint object of every connection point for outgoing data.
 o getTrafficDescr()
Returns the traffic descriptor object defining traffic properties of this connection.
 o isActive()
Returns the state of this connection.
 o rebind(VCPoint, VCPoint)
Rebinds one point of this connection to another point.
 o release()
Releases this connection and corresponding points.
 o removeOutPoint(VCPoint)
Removes a point from this connection.
 o setActive(boolean)
Sets the state of this connection.
 o setItemReference(DListIterator)
Sets the reference pointing to the item representing this connection in the data structures of Switch class.
 o toString()
Returns textual representation of this MCConnection object.

Variables

 o DEBUG
 protected static final boolean DEBUG
DEBUG flag controls if we want to compile debug messages.

Constructors

 o MCConnection
 protected MCConnection(VCPoint inPoint_,
                        TrafficDescr td_)
Constructs a MCConnectionn object with parameters defining incoming point and traffic properties.

Parameters:
inPoint_ - VCPoint object of the incoming point.
td_ - Traffic descriptor for this connection.

Methods

 o toString
 public String toString()
Returns textual representation of this MCConnection object.

Returns:
Textual representation of this object.
Overrides:
toString in class Object
 o isActive
 public boolean isActive()
Returns the state of this connection.

Returns:
true if this connection is active, else returns false.
 o release
 public synchronized void release() throws SwitchException
Releases this connection and corresponding points. After call to this method finnishes, this connection does not exists.

Throws: SwitchException
If connection has already been released.
 o getInPoint
 public VCPoint getInPoint()
Returns the VCPoint object representing the connection point for incoming data.

Returns:
the VCPoint object of incoming point.
 o getOutPoints
 public Enumeration getOutPoints()
Returns Enumeration object that contains VCPoint object of every connection point for outgoing data.

Returns:
Enumeration object containing VCPoints.
 o getTrafficDescr
 public TrafficDescr getTrafficDescr()
Returns the traffic descriptor object defining traffic properties of this connection.

Returns:
the TrafficDescr object of this connection.
 o addOutPoint
 public synchronized void addOutPoint(VCPoint newPoint_) throws SwitchException
Adds a new outgoing point to this connection.

Parameters:
newPoint_ - The point to be added to this connection.
Throws: SwitchException
If this connection is not active.
Throws: SwitchException
If point belongs to another connection.
 o removeOutPoint
 public void removeOutPoint(VCPoint point_) throws SwitchException
Removes a point from this connection. Note that incoming connection point cannot be removed, it can only be rebound.

Parameters:
point_ - the point to be removed from this connection.
Throws: SwitchException
If this connection is not active.
Throws: SwitchException
if point does not belong to this connection.
Throws: SwitchException
if the point is the incoming point of this connection.
 o rebind
 public void rebind(VCPoint old_,
                    VCPoint new_) throws SwitchException
Rebinds one point of this connection to another point. The point to be replaced is identified by giving the VCPoint object of that point. The old point is replaced with new point, that is also given as an argument.

Parameters:
old_ - the VCPoint object of point to be replaced.
new_ - the VCPoint object of the new point.
Throws: SwitchException
If this connection is not active.
 o getID
 protected int getID()
Returns connection ID of this connection.

Returns:
Connection ID of this connection.
 o forcedRelease
 protected void forcedRelease()
Releases this connection. This method is intended to be used only when initSwitch or resetSwitch methods need to release connections before doing the actual switch reset or initialization.

 o setActive
 protected void setActive(boolean newState_)
Sets the state of this connection.

Parameters:
newState_ - the new state of this connection.
 o getItemReference
 protected DListIterator getItemReference()
Returns reference to the item representing this connection in the data structures of Switch class. This method is needed only by Switch class.

Returns:
reference to the DListIterator representing this connection.
 o setItemReference
 protected void setItemReference(DListIterator reference_)
Sets the reference pointing to the item representing this connection in the data structures of Switch class. This method is needed only by Switch class.

Parameters:
reference - to the DListIterator representing this connection.

All Packages  Class Hierarchy  This Package  Previous  Next  Index