|
||||||||||
| 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.OpticalChannel
This is an end-to-end connection for a single wavelength.
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.
| Field Summary | |
private int |
id
The id of this optical channel. |
private int |
noChannelSegments
Number of channelsegments assigned to the channel. |
private OpticalPath |
opticalPath
The optical path this connection belongs to. |
private OpticalChannelSegment[] |
segment
This array contains the optical segments that creates the channel. |
private boolean |
switchConfigured
Indicates if the configuration method is already called or not. |
private java.util.Vector |
wsg
Waveband Switching Group. |
| Fields inherited from class gov.nist.antd.optical.AbstractObject |
INITIAL_ARRAY_SIZE |
| Constructor Summary | |
OpticalChannel(OpticalPath opticalPath)
Creates an optical channel connection. |
|
| Method Summary | |
void |
addChannelSegment(OpticalChannelSegment newSegment)
Add an optical channel segment. |
boolean |
configDropSession(ProtocolSession receiver)
Set the protocol that receive message for this channel |
void |
configSwitches()
Configures the switches for this Channel. |
boolean |
connectEnds(OXCSwitch oxcSrc,
int addPort,
OXCSwitch oxcDest,
int dropPort)
Connect the channel according to the given parameters |
protected java.lang.Object[] |
createArray(int size)
Creates an OpticalChannelSegment array of the specified size. |
void |
finalize()
Reset switches if not already done before the Channel will be discarded. |
int |
getAddPort()
Find the addPort for this channel |
double |
getBandwidth()
Return the bandwidth of this channel. |
int |
getDropPort()
Find the dropPort for this channel |
ProtocolSession |
getDropSession()
Return the DropSession that receives the messages |
int |
getID()
Get the id of this optical channel. |
protected int |
getNoSegments()
Returns the number of stored channel segments. |
OpticalPath |
getOpticalPath()
Get the optical path this connection belongs to. |
OpticalChannelSegment |
getSegment(int index)
Returns the specific segment which belongs to this channel. |
OpticalChannelSegment[] |
getSegments()
Returns a copy of the list of channel segments which belong to this channel. |
private OXCSwitch |
getSwitchBetween(OpticalChannelSegment from,
OpticalChannelSegment to)
Determines the switch that connects two segments. |
java.util.Vector |
getWsg()
get the Waveband Switching Group. |
boolean |
isFailure()
Determines if the Channel is usable. |
boolean |
isSwitchConfigured()
Determines if the Channel is configured for use . |
void |
removeChannelSegment(OpticalChannelSegment newSegment)
Removes the given channel segment. |
void |
resetSwitches()
Reset the switches for this Channel. |
void |
setID(int newID)
Set the id of this optical channel. |
protected void |
setNoElements(int size)
Set the number of channel segments. |
protected void |
setSwitchConfigured(boolean newValue)
Set the switch status of the Channel. |
void |
setWsg(java.util.Vector wsg)
Set the Waveband Switching Group. |
java.lang.String |
toString()
Return the textual representatrion of the lambdas of this channel |
| 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 OpticalPath opticalPath
private int noChannelSegments
private boolean switchConfigured
private OpticalChannelSegment[] segment
private java.util.Vector wsg
| Constructor Detail |
public OpticalChannel(OpticalPath opticalPath)
opticalPath - the path the channel used for.| Method Detail |
public void addChannelSegment(OpticalChannelSegment newSegment)
newSegment - The segment that has to be added to this channel.public int getID()
public OpticalPath getOpticalPath()
public java.util.Vector getWsg()
public boolean isFailure()
public OpticalChannelSegment[] getSegments()
public OpticalChannelSegment getSegment(int index)
index - The index of the requested segment.
public double getBandwidth()
protected int getNoSegments()
private OXCSwitch getSwitchBetween(OpticalChannelSegment from,
OpticalChannelSegment to)
from - the incomming segment.to - the outgoing segment.
public boolean isSwitchConfigured()
public void setID(int newID)
throws IllegalIDException
newID - The new id.
IllegalIDException - if the parameter is invalid.public void setWsg(java.util.Vector wsg)
wsg - The wsg vector.public void removeChannelSegment(OpticalChannelSegment newSegment)
newSegment - The segment to remove.protected void setNoElements(int size)
setNoElements in class AbstractObjectsize - the new number of channel segments.protected void setSwitchConfigured(boolean newValue)
newValue - true if the switch is configured, otherwise false.protected java.lang.Object[] createArray(int size)
createArray in class AbstractObjectsize - The size of the segment array.
public void configSwitches()
throws OpticalChannelException,
InvalidConnectionException
OpticalChannelException - Will be thrown if a switch is missing
between two segments.
InvalidConnectionException - will be throws by the OXCSwitch
public void resetSwitches()
throws OpticalChannelException,
InvalidConnectionException
OpticalChannelException - Will be thrown if a switch is missing
between two segments.
InvalidConnectionException - Will be throws by the OXCSwitchpublic void finalize()
finalize in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
public boolean connectEnds(OXCSwitch oxcSrc,
int addPort,
OXCSwitch oxcDest,
int dropPort)
oxcSrc - The oxcswitch at the source nodeaddPort - The addPort number to connect withoxcDest - The oxcswitch at the destination nodedropPort - The dropPort number to connect with
public boolean configDropSession(ProtocolSession receiver)
receiver - The protocol receiver
public int getAddPort()
public int getDropPort()
public ProtocolSession getDropSession()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||