|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.nist.antd.optical.util.PathUtil
This class contains tools for OpticalConnection, OpticalPath and connections.
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.
| Constructor Summary | |
private |
PathUtil()
Private constructor to avoid instantiation |
| Method Summary | |
static boolean |
contains(OpticalConnection route,
Lambda lambda)
Utility function to check if a route contains a lambda |
static boolean |
contains(OpticalConnection route,
OpticalLink link)
Utility function to check if a route contains a link |
static OpticalConnection |
createOpticalConnection(ExtRouter source,
ExtRouter dest,
QualityOfService qos)
create an object connection between two nodes and set the id |
static void |
createRouteFromLinks(int[] linksId,
OpticalConnection oRoute)
Create a vector of PtPBundle (of link) that represents a route |
static void |
createRouteFromLinks(java.util.Vector links,
OpticalConnection oRoute)
Create a vector of PtPBundle (of link) that represents a route |
static void |
createRouteFromNodes(int[] nodesId,
OpticalConnection oRoute)
Create a vector of PtPBundle (of link) that represents a route |
static void |
createRouteFromNodes(java.util.Vector nodes,
OpticalConnection oRoute)
Create a vector of PtPBundle (of link) that represents a route |
static OpticalConnection |
createRouteObject(ExtRouter source,
ExtRouter dest,
QualityOfService qos)
Deprecated. use createOpticalConnection |
static boolean |
deleteConnection(OpticalConnection oRoute)
Delete a lightpath and disconnect all lambdas |
static OpticalConnection[] |
getAllConnections(OpticalLink link,
PathContainer container)
Get all paths from the pathContainer that contain the link |
static OpticalPath[] |
getAllPaths(OpticalLink link,
PathContainer container)
get all paths from the pathContainer that that contain the link |
static OpticalConnection[] |
getAllRoutes(OpticalLink link,
PathContainer container)
Deprecated. use getAllConnections (OpticalLink, PathContainer). |
static int |
getAvailableId(Glass net)
Find the next available id for a route |
static OpticalConnection |
getConnection(Glass net,
int id)
Return the route that has the given ID or null |
static OpticalConnection |
getConnectionOfLambda(Glass net,
Lambda lambda)
Return the route that contains a lambda or null if not found |
static PathContainer[] |
getPathContainers(Glass net)
This method determines the existing PathContainer's in the network. |
static int[] |
getReceiverInformations(OpticalConnection oRoute)
Return the port numbers for the receiver |
static java.lang.String |
getReceiverProtocol(OpticalConnection route)
Return the name of the protocol session that receives the messages |
static OpticalConnection |
getRoute(Glass net,
int id)
Deprecated. use getConnection (Flass net, int id). |
static OpticalConnection |
getRouteOfLambda(Glass net,
Lambda lambda)
Deprecated. use getConnectionOfLambda (Glass, Lambda) |
static OpticalChannelSegment |
getSegment(Glass net,
Lambda lambda)
Utility function to find the Segment the lambda is assigned to |
static int[] |
getSenderInformations(OpticalConnection oRoute)
Return the port numbers for the sender |
static boolean |
isConnectionIdUsed(Glass net,
int id)
check if this connection Id is already used. |
static boolean |
isRouteIdUsed(Glass net,
int id)
Deprecated. use isConnectionIdUsed (Glass, int) |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
private PathUtil()
| Method Detail |
public static OpticalConnection createRouteObject(ExtRouter source,
ExtRouter dest,
QualityOfService qos)
source - The source of the connectiondest - The destination of the connectionqos - The quality of service requested
public static OpticalConnection createOpticalConnection(ExtRouter source,
ExtRouter dest,
QualityOfService qos)
source - The source of the connectiondest - The destination of the connectionqos - The quality of service requested
public static int getAvailableId(Glass net)
net - The network the connection has to be assigned to.
public static boolean isRouteIdUsed(Glass net,
int id)
net - The OpNet the route will be assigned to.id - the id that has to be checked.
public static boolean isConnectionIdUsed(Glass net,
int id)
net - The OpNet the connection will be assigned to.id - the id that has to be checked.
public static OpticalConnection getRoute(Glass net,
int id)
net - The OpNet the route will be assigned to.id - the id that has to be checked.
public static OpticalConnection getConnection(Glass net,
int id)
net - The OpNet the route will be assigned to.id - the id that has to be checked.
public static int[] getSenderInformations(OpticalConnection oRoute)
oRoute - An optical route
public static int[] getReceiverInformations(OpticalConnection oRoute)
oRoute - An optical route
public static java.lang.String getReceiverProtocol(OpticalConnection route)
route - The OpticalConnection
public static boolean deleteConnection(OpticalConnection oRoute)
oRoute - the OpticalConnection to delete
if - the parameter is null
public static void createRouteFromNodes(java.util.Vector nodes,
OpticalConnection oRoute)
throws IllegalDataException
nodes - The vector of nodes that represents the path.oRoute - The optical route that stores the result.
IllegalDataException - if an error occurs.
public static void createRouteFromLinks(java.util.Vector links,
OpticalConnection oRoute)
throws IllegalDataException
links - The vector of links that represents the path.oRoute - The optical route that stores the result.
IllegalDataException - if an error occurs.
public static void createRouteFromNodes(int[] nodesId,
OpticalConnection oRoute)
throws IllegalDataException
nodesId - The array of node id that represents the path. the path ends
if the end of the array is reached or the first id==-1
occurs.oRoute - The optical route that stores the result.
IllegalDataException - if an error occurs.
public static void createRouteFromLinks(int[] linksId,
OpticalConnection oRoute)
throws IllegalDataException
linksId - The array of links id that represents the path. The path ends
at the end of the array or at the first occurance of an
id == -1.oRoute - The optical route that stores the result.
IllegalDataException - if an error occurs.public static PathContainer[] getPathContainers(Glass net)
net - The OpNet that contains the containers.
public static OpticalPath[] getAllPaths(OpticalLink link,
PathContainer container)
link - the link being searched forcontainer - the pathContainer where the paths are
public static OpticalConnection[] getAllRoutes(OpticalLink link,
PathContainer container)
link - the link being searched forcontainer - The pathContainer where the paths are
public static OpticalConnection[] getAllConnections(OpticalLink link,
PathContainer container)
link - the link being searched forcontainer - The pathContainer where the paths are
public static boolean contains(OpticalConnection route,
OpticalLink link)
route - optical route to check inlink - Optical link to check for
public static boolean contains(OpticalConnection route,
Lambda lambda)
route - optical route to check inlambda - Lambda to check for
public static OpticalConnection getRouteOfLambda(Glass net,
Lambda lambda)
net - The OpNet where to looklambda - Lambda to check for
public static OpticalConnection getConnectionOfLambda(Glass net,
Lambda lambda)
net - The OpNet where to looklambda - Lambda to check for
public static OpticalChannelSegment getSegment(Glass net,
Lambda lambda)
net - The network th elambda belongs to.lambda - Lambda to check for
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||