All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class calypso.core.atmswitch.PPConnection

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

public class PPConnection
extends VCConnection
Representation of point-to-point connection.

PPConnection class provides means to control an existing point-to-point 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 and release the 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 PPConnection(VCPoint, VCPoint, TrafficDescr)
Constructs a PPConnectionn object with parameters defining incoming point, outgoing point and traffic properties.

Method Index

 o forcedRelease()
Releases this connection.
 o getID()
Returns connection ID of this connection.
 o getInPoint()
Returns the VCPoint object representing the point of 'incoming' data.
 o getItemReference()
Returns reference to the item representing this connection in the data structures of Switch class.
 o getOutPoint()
Returns the VCPoint object representing the point of '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 connection points.
 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 PPConnection object.

Variables

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

Constructors

 o PPConnection
 protected PPConnection(VCPoint inPoint_,
                        VCPoint outPoint_,
                        TrafficDescr td_)
Constructs a PPConnectionn object with parameters defining incoming point, outgoing point and traffic properties.

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

Methods

 o toString
 public String toString()
Returns textual representation of this PPConnection 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 connection points. After call to this method finnishes, the connection no longer exists in the switch.

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

Returns:
the VCPoint object of incoming point.
 o getOutPoint
 public VCPoint getOutPoint()
Returns the VCPoint object representing the point of 'outgoing' data.

Returns:
the VCPoint object of outgoing point.
 o getTrafficDescr
 public TrafficDescr getTrafficDescr()
Returns the traffic descriptor object defining traffic properties of this connection.

Returns:
the TrafficDescr object of this connection.
 o rebind
 public synchronized 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 given as 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.
Throws: SwitchException
If old point does not belong to this connection.
Throws: SwitchException
If new point belongs to some other connection.
 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