|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--gov.nist.antd.optical.AbstractObject
|
+--gov.nist.antd.optical.path.OpticalConnection
This is an end-to-end connection. The route contains the source and the destination node and the used optical path.
This class was developed at the National Institute of Standards and Technology by employees of the Federal Government in the course of their official duties. Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the public domain. NIST assumes no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic.
We would appreciate acknowledgement if the software is used.
NIST ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
VERSION CONTROL
-------------------------------------------------------------------------
Name - YYYY/MM/DD - VERSION - ACTION
borchert - 2001/05/29 - 1.0 - Source created
borchert - 2001/09/27 - 1.1 - Add CHANGE event in setOpticalPath
borchert - 2001/10/18 - 2.0 - configure the switches by registering the route. - Add isConfigured() - Add useAddDropPort () - Add rerouteStart (Lambda) - Add rerouteEnd (Lambda) borchert - 2001/11/21 - 2.1 - Added the type of protection. rouil - 2002/01/28 - 2.2 - Modify registration management. borchert - 2002/06/06 - 3.0 - Changed class name to OpticalConnection. - Marked method isRouteOf as deprecated. - Added method isConnectionBetween. rouil - 2002/06/18 - 3.01- Added method getUsedRoute rouil - 2002/06/20 - 3.1 - Changed OXCEdgeRouter to ExtRouter. rouil - 2002/07/09 - - Fixed bug in the TEventObject created rouil - 2002/07/16 - - Updated call to deprecated methods rouil - 2002/09/25 - 3.2 - Deprecated createRouteFromLinks(linkid[]) Added createRouteFromLinks(String[] linkNhi). Same modification for createRouteFromNodes.
| Field Summary | |
private OpticalConnection |
backup
The backup route to this route. |
private ExtRouter |
destination
The destination node of the route. |
private int |
id
The id of this route. |
private int |
noRoutes
The number of possible routes |
private ProtocolSession |
owner
The Protocol Session that is registered to this route. |
private OpticalPath |
path
The light path that of the route. |
private java.util.Vector |
protectionFor
Stores workingpath or Optical links that has to be protected by this Route. |
private QualityOfService |
qos
The QoS of the route. |
private java.util.Vector[] |
routes
The array of vectors that contain the links for possible routes |
private ExtRouter |
source
The source node of the route. |
| Fields inherited from class gov.nist.antd.optical.AbstractObject |
INITIAL_ARRAY_SIZE |
| Constructor Summary | |
OpticalConnection()
Creates an optical route. |
|
| Method Summary | |
void |
addProtectionFor(java.lang.Object obj)
This method checks if the protected object is a link or path(route). |
void |
addRoute(java.util.Vector route)
Add the route to the array of routes. |
void |
addRouteFromLinkList(int[] linkIDs)
Deprecated. Use addRouteFromLinkList(String linksNhi) |
void |
addRouteFromLinkList(java.lang.String[] linksNhi)
Add the route represented by a list of optical links Nhi. |
void |
addRouteFromLinkList(java.util.Vector linkList)
Add the route represented by a list of optical links. |
void |
addRouteFromNodeList(int[] nodeIDs)
Deprecated. Use addRouteFromNodeList(String nodesNhi) |
void |
addRouteFromNodeList(java.lang.String[] nodesNhi)
Add the route represented by a list of nodes Nhi. |
void |
addRouteFromNodeList(java.util.Vector nodeList)
Add the route represented by a list of nodes. |
protected java.lang.Object[] |
createArray(int size)
Creates a route array of the specified size. |
void |
finalize()
Reset the path if necessary. |
OpticalConnection |
getBackupRoute()
Determins the backupRoute for this route. |
double |
getBandWidth(java.util.Vector route,
boolean available)
Gets the minimum bandwidth for data transfer for this Route. |
ExtRouter |
getDestination()
Returns the destination Router node. |
double |
getDistance(java.util.Vector route)
Gets the distance of this route |
int |
getID()
Return the id of this optical route. |
int |
getNoRoutes()
Get the number of routes |
OpticalPath |
getOpticalPath()
Returns the optical path connection used for this route. |
ProtocolSession |
getOwner()
Return the owner |
java.util.Vector |
getProtectionFor()
Return a copy of the Vector of the protected objects |
QualityOfService |
getQoS()
Returns the Quality of Service. |
java.util.Vector[] |
getRoutes()
Get the array of routes |
ExtRouter |
getSource()
Returns the source Router node. |
java.util.Vector |
getUsedRoute()
Get the used route. |
boolean |
isAvailable()
Return if this route is owned by a ProtocolSession |
boolean |
isConfigured()
Determines if the route is completely configured. |
boolean |
isConnectionBetween(ExtRouter src,
ExtRouter dest)
Determines if the connection is the two nodes with direction source to destination. |
boolean |
isLinkProtection()
Returns true if this route is a backup for links or not. |
boolean |
isPathFailed()
Check if the path is failed |
boolean |
isPathProtection()
Returns true if this route is a backup for route(s) or not. |
boolean |
isProtection()
Returns if this route is a backup route or not. |
boolean |
isRouteOf(ExtRouter src,
ExtRouter dest)
Deprecated. use method isConnectionBetween() instead. |
boolean |
register(ProtocolSession srcSession)
Register a ProtocolSession to own this route |
void |
reRouteEnd(Lambda outLambda,
OpticalChannel channel)
Reroutes the ending lambda. |
void |
reRouteStart(Lambda inLambda,
OpticalChannel channel)
Reroutes the starting lambda. |
void |
resetRoutes()
reset the possible routes |
void |
setBackupRoute(OpticalConnection backup)
Set the backup route for this route. |
void |
setDestination(ExtRouter destinationNode)
Set the destination node. |
void |
setID(int newID)
Set the optical route's id. |
protected void |
setNoElements(int size)
Set the number of routes. |
void |
setOpticalPath(OpticalPath newPath)
Set the optical path connection used for this route. |
void |
setQoS(QualityOfService newQos)
Set the Quality of Service. |
void |
setSource(ExtRouter sourceNode)
Set the source node. |
java.lang.String |
toString()
Returns the string representation of this route. |
boolean |
unregister(ProtocolSession session)
Unregister a ProtocolSession to free this route. |
| Methods inherited from class gov.nist.antd.optical.AbstractObject |
addElement, clear, isElementOf, removeElement |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private int id
private int noRoutes
private java.util.Vector protectionFor
private OpticalPath path
private ExtRouter source
private ExtRouter destination
private OpticalConnection backup
private QualityOfService qos
private ProtocolSession owner
private java.util.Vector[] routes
| Constructor Detail |
public OpticalConnection()
| Method Detail |
public java.util.Vector[] getRoutes()
public java.util.Vector getUsedRoute()
public int getNoRoutes()
public QualityOfService getQoS()
public boolean isAvailable()
public ProtocolSession getOwner()
public ExtRouter getDestination()
public int getID()
public OpticalPath getOpticalPath()
public ExtRouter getSource()
public double getBandWidth(java.util.Vector route,
boolean available)
route - the route whose bandwidth is wanted.available - If true the maximal available bandwith will be calculated;
otherwise the maximal available bandwidth.
public double getDistance(java.util.Vector route)
route - the route whose distance is wanted
public boolean isProtection()
public boolean isLinkProtection()
public boolean isPathProtection()
public java.util.Vector getProtectionFor()
public boolean isRouteOf(ExtRouter src,
ExtRouter dest)
src - The source node.dest - The desitnation node.
public boolean isConnectionBetween(ExtRouter src,
ExtRouter dest)
src - The source node.dest - The desitnation node.
protected void setNoElements(int size)
setNoElements in class AbstractObjectsize - the new number of channel segments.public void setQoS(QualityOfService newQos)
newQos - the QoS.public void addRoute(java.util.Vector route)
route - the route to be added.public void resetRoutes()
public void setDestination(ExtRouter destinationNode)
destinationNode - the destination Router.
java.lang.NullPointerException - will be thrown if a null value will be
passed
public void setID(int newID)
throws IllegalIDException
newID - The id.
IllegalIDException - The id is not a legal ID.
public void setOpticalPath(OpticalPath newPath)
throws DataIntegrityException
newPath - The used optical path.
DataIntegrityException - Will be thrown if the new path is not
assigned to this route.public void setSource(ExtRouter sourceNode)
sourceNode - the source Router or null.
java.lang.NullPointerException - will be thrown if a null value will be
passedpublic void addRouteFromLinkList(java.util.Vector linkList)
linkList - The list of optical links.public void addRouteFromLinkList(int[] linkIDs)
linkIDs - The list of optical links Id.public void addRouteFromLinkList(java.lang.String[] linksNhi)
linksNhi - The list of optical links Nhi.public void addRouteFromNodeList(java.util.Vector nodeList)
nodeList - The list of nodes.public void addRouteFromNodeList(int[] nodeIDs)
nodeIDs - The list of nodes Id.public void addRouteFromNodeList(java.lang.String[] nodesNhi)
nodesNhi - The list of nodes Nhi.
public void addProtectionFor(java.lang.Object obj)
throws IllegalDataException
obj - The protected object.
IllegalDataException - will be thrown if the object is of the
wrong type.protected java.lang.Object[] createArray(int size)
createArray in class AbstractObjectsize - The size of the segment array.
public boolean register(ProtocolSession srcSession)
srcSession - The ProtocolSession that wants to use the route
java.lang.NullPointerException - If the given owner is null.
public boolean unregister(ProtocolSession session)
throws java.lang.NullPointerException
session - The ProtocolSession that uses the route
java.lang.NullPointerException - The given session is null.public boolean isConfigured()
public OpticalConnection getBackupRoute()
public void setBackupRoute(OpticalConnection backup)
backup - The backup.
public void reRouteStart(Lambda inLambda,
OpticalChannel channel)
throws InvalidConnectionException,
ProtocolException,
OpticalChannelException
inLambda - The lambda the channels first lambda has to be connected
to.channel - The channel that has to be reRouted
InvalidConnectionException - The switch refused the connection
ProtocolException - The Switch was not found.
OpticalChannelException - If the Channel is not configured.
public void reRouteEnd(Lambda outLambda,
OpticalChannel channel)
throws InvalidConnectionException,
ProtocolException,
OpticalChannelException
outLambda - the lambda the end lambda of the given channel
has to connected to.channel - The channel that has to be reRouted
InvalidConnectionException - The switch refused the connection
ProtocolException - The Switch was not found.
OpticalChannelException - If the Channel is not configured.public void finalize()
finalize in class java.lang.Objectpublic boolean isPathFailed()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||