|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.nist.antd.merlin.util.ConnectionUtil
This class contains tools connection management.
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 |
ConnectionUtil()
private constructor to avoid instantiation |
| Method Summary | |
static boolean |
connectSwitches(OpticalConnection oRoute)
Connect the switches of the given route. |
static boolean |
connectSwitches(OpticalConnection oRoute,
int[] addPort)
Connect the switches of the given route. |
static boolean |
connectSwitches(OpticalConnection oRoute,
int[] addPort,
int[] dropPort)
Connect the switches of the given route. |
static OpticalConnection |
createConnection(ExtRouter source,
ExtRouter dest,
QualityOfService qos,
boolean autoConnect)
Connection request. |
static boolean |
deleteConnection(OpticalConnection oRoute)
Delete a lightpath and disconnect all lambdas |
static boolean |
disconnectSwitches(OpticalConnection oRoute)
Disconnect the given route. |
static OpticalConnection |
findConnection(ExtRouter source,
ExtRouter dest,
QualityOfService qos)
Request a lightpath with the specific QoS. |
static int[] |
getReceiverInformations(OpticalConnection oRoute)
Return the port numbers for the receiver |
static int[] |
getSenderInformations(OpticalConnection oRoute)
Return the port numbers for the sender on the working route or the backup route if existing. |
static boolean |
isCompatible(OpticalConnection route,
ExtRouter source,
ExtRouter dest,
QualityOfService qos)
Compare the characteristics of the route and the QoS |
static int[] |
register(ProtocolSession session,
OpticalConnection oRoute)
This method register to the given route or the attached backup route if failed. |
static int[] |
register(ProtocolSession srcSession,
java.lang.String destProtocolName,
OpticalConnection oRoute)
This method register to the given route or the attached backup route if failed. |
static boolean |
unregister(ProtocolSession session,
OpticalConnection oRoute)
Unregister a ProtocolSession to free this route. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
private ConnectionUtil()
| Method Detail |
public static OpticalConnection createConnection(ExtRouter source,
ExtRouter dest,
QualityOfService qos,
boolean autoConnect)
source - The source of the connectiondest - The destination of the connectionqos - The quality of service (can be null)autoConnect - if True, then connect the switches along the path.
public static OpticalConnection findConnection(ExtRouter source,
ExtRouter dest,
QualityOfService qos)
source - The source of the connectiondest - The destination of the connectionqos - The quality of service (can be null)
public static boolean isCompatible(OpticalConnection route,
ExtRouter source,
ExtRouter dest,
QualityOfService qos)
route - The route to check.source - The supposed source node.dest - The supposed destination node.qos - The Quality of Service requested.
public static int[] getSenderInformations(OpticalConnection oRoute)
oRoute - An optical route
public static int[] getReceiverInformations(OpticalConnection oRoute)
oRoute - An optical route
public static boolean deleteConnection(OpticalConnection oRoute)
oRoute - the OpticalConnection to delete
if - the parameter is nullpublic static boolean connectSwitches(OpticalConnection oRoute)
oRoute - The OpticalConnection to connect.
java.lang.NullPointerException - If the given route is null.
public static boolean connectSwitches(OpticalConnection oRoute,
int[] addPort)
oRoute - The OpticalConnection to connect.addPort - The port number to use as addPort
java.lang.NullPointerException - If the given route is null.
public static boolean connectSwitches(OpticalConnection oRoute,
int[] addPort,
int[] dropPort)
oRoute - The OpticalConnection to connect.addPort - The port number to use as addPortdropPort - The port number to use at the destination
java.lang.NullPointerException - If the given route is null.
public static boolean disconnectSwitches(OpticalConnection oRoute)
throws java.lang.NullPointerException
oRoute - The OpticalConnection to disconnect.
java.lang.NullPointerException - The given session is null.
public static int[] register(ProtocolSession session,
OpticalConnection oRoute)
session - The protocol that wants to register.oRoute - The OpticalConnection to register to.
java.lang.NullPointerException - If the given owner is null.
public static int[] register(ProtocolSession srcSession,
java.lang.String destProtocolName,
OpticalConnection oRoute)
srcSession - The ProtocolSession that wants to use the routedestProtocolName - The name of the protocol to attach the route
at the destination nodeoRoute - The OpticalConnection to register to.
java.lang.NullPointerException - If the given owner is null.
public static boolean unregister(ProtocolSession session,
OpticalConnection oRoute)
throws java.lang.NullPointerException
session - The ProtocolSession that uses the routeoRoute - The OpticalConnection to unregister to.
java.lang.NullPointerException - The given session is null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||