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
-
DEBUG
- DEBUG flag controls if we want to compile debug messages.
-
MCConnection(VCPoint, TrafficDescr)
- Constructs a MCConnectionn object with parameters defining incoming
point and traffic properties.
-
addOutPoint(VCPoint)
- Adds a new outgoing point to this connection.
-
forcedRelease()
- Releases this connection.
-
getID()
- Returns connection ID of this connection.
-
getInPoint()
- Returns the VCPoint object representing the connection point for
incoming data.
-
getItemReference()
- Returns reference to the item representing this connection in the
data structures of Switch class.
-
getOutPoints()
- Returns Enumeration object that contains VCPoint object of every
connection point for outgoing data.
-
getTrafficDescr()
- Returns the traffic descriptor object defining traffic properties
of this connection.
-
isActive()
- Returns the state of this connection.
-
rebind(VCPoint, VCPoint)
- Rebinds one point of this connection to another point.
-
release()
- Releases this connection and corresponding points.
-
removeOutPoint(VCPoint)
- Removes a point from this connection.
-
setActive(boolean)
- Sets the state of this connection.
-
setItemReference(DListIterator)
- Sets the reference pointing to the item representing this connection
in the data structures of Switch class.
-
toString()
- Returns textual representation of this MCConnection object.
DEBUG
protected static final boolean DEBUG
- DEBUG flag controls if we want to compile debug messages.
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.
toString
public String toString()
- Returns textual representation of this MCConnection object.
- Returns:
- Textual representation of this object.
- Overrides:
- toString in class Object
isActive
public boolean isActive()
- Returns the state of this connection.
- Returns:
- true if this connection is active, else returns false.
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.
getInPoint
public VCPoint getInPoint()
- Returns the VCPoint object representing the connection point for
incoming data.
- Returns:
- the VCPoint object of incoming point.
getOutPoints
public Enumeration getOutPoints()
- Returns Enumeration object that contains VCPoint object of every
connection point for outgoing data.
- Returns:
- Enumeration object containing VCPoints.
getTrafficDescr
public TrafficDescr getTrafficDescr()
- Returns the traffic descriptor object defining traffic properties
of this connection.
- Returns:
- the TrafficDescr object of this connection.
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.
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.
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.
getID
protected int getID()
- Returns connection ID of this connection.
- Returns:
- Connection ID of this connection.
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.
setActive
protected void setActive(boolean newState_)
- Sets the state of this connection.
- Parameters:
- newState_ - the new state of this connection.
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.
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