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
-
DEBUG
- DEBUG flag controls if we want to compile debug messages.
-
PPConnection(VCPoint, VCPoint, TrafficDescr)
- Constructs a PPConnectionn object with parameters defining incoming
point, outgoing point and traffic properties.
-
forcedRelease()
- Releases this connection.
-
getID()
- Returns connection ID of this connection.
-
getInPoint()
- Returns the VCPoint object representing the point of 'incoming'
data.
-
getItemReference()
- Returns reference to the item representing this connection in the
data structures of Switch class.
-
getOutPoint()
- Returns the VCPoint object representing the point of '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 connection points.
-
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 PPConnection object.
DEBUG
protected static final boolean DEBUG
- DEBUG flag controls if we want to compile debug messages.
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.
toString
public String toString()
- Returns textual representation of this PPConnection 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 connection points. After
call to this method finnishes, the connection no longer exists in the
switch.
- Throws: SwitchException
- If connection has already been released.
getInPoint
public VCPoint getInPoint()
- Returns the VCPoint object representing the point of 'incoming'
data.
- Returns:
- the VCPoint object of incoming point.
getOutPoint
public VCPoint getOutPoint()
- Returns the VCPoint object representing the point of 'outgoing'
data.
- Returns:
- the VCPoint object of outgoing point.
getTrafficDescr
public TrafficDescr getTrafficDescr()
- Returns the traffic descriptor object defining traffic properties
of this connection.
- Returns:
- the TrafficDescr object of this connection.
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.
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