gov.nist.antd.mpls.mgmt.mpls_interface
Class MPLSOpticalInterface

java.lang.Object
  |
  +--gov.nist.antd.mpls.mgmt.mpls_interface.MPLSOpticalInterface

public class MPLSOpticalInterface
extends java.lang.Object

Optical Interface to manage several fibers and lambdas.
The MPLSOpticalInterface provedes a capability of management for a Optical Interface(ONIC) to the MPLSInterfaceInfo. It collects fibers and lambdas information from the ONIC, and creates management table.

  +------------------------------+
  |  MPLSInterfaceInfo           |
  |  - InterfaceType == ONICType |      
  |  - MPLSOpticalInterface <----+---+ MPLSOpticalInterface provedes the MPLSInterfaceInfo with 
  +------+-----------------------+   | the configuration informations of the ONIC.
         |                           | So, the MPLSInterfaceInfo can handle the fibers and lambdas of the OpticalLink  
    +---------+       +--------------+----------+                  
    | ONIC    |<......| MPLSOpticalInterface    |        +-------------------------+          
    +---------+       |  - inFiberTable  <------+--------| OpticalFiberInfo class  |+
                      |  - outFiberTable <------+--------| - fiberID               ||+
                      |  - ControlChannelTable  |        | - Resource Informaton   |||
                      |  - Resource Information |        | - lambdaTable  <--------------+
                      +-------------------------+        | - Lambda Monitoring func|||   |
                                                         +-------------------------+||   |
                                                           +------------------------+|   |
                                                              +----------------------+   |
                                                                                         |
                                                                       +-----------------+
                                                                       |                  
                                                                       |                  
                                                         +-------------------------+    
                                                         | LambdaInfo class        |+
                                                         | - fiberID               ||+
                                                         | - Resource Informaton   |||
                                                         +-------------------------+||
                                                           +------------------------+|
                                                              +----------------------+
 

 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.

Author:
EunHyuk Lim (ehlim@antd.nist.gov, othree28@hotmail.com)
, borchert

Nested Class Summary
 class MPLSOpticalInterface.LambdaInfo
          Class LambdaInfo This class represents the Lambda information
 class MPLSOpticalInterface.OpticalFiberInfo
          Class OpticalFiberInfo This class represents the Optical Fiber information
 
Field Summary
 double availableInBandWidth
          Field availableInBandWidth - Available incoming bandwidth
 double availableOutBandWidth
          Field availableOutBandWidth - Available outgoing bandwidth
(package private)  MPLSInterfaceInfo ifaceInfo
          Field ifaceInfo - MPLS Interface Information
 java.util.Vector inControlChannelTable
          Field inControlChannelTable - Incoming Control channel table
 java.util.Hashtable inFiberTable
          Field inFiberTable - Incoming Fiber Table
 MPLSMgmt mplsMgmt
          Field mplsmgmt - MPLS Management Information
(package private)  int NodeType
          Field NodeType - Node type
(package private)  ONIC onic
          Field onic - Optical NIC
 java.util.Vector outControlChannelTable
          Field outControlChannelTable - Outgoing Control channel Table
 java.util.Hashtable outFiberTable
          Field outFiberTable - Outgoing Fiber Table
 double totalInBandWidth
          Field totalInBandWidth - Total Incoming bandwidth
 double totalInControlChannelBandWidth
          Field totalInControlChannelBandWidth - Total Incoming Control channel bandwidth
 int totalInControlLambdaNum
          Field totalInControlLambdaNum - Total Incoming Control Lambda Number
 int totalInDataLambdaNum
          Field totalInDataLambdaNum - Total Incoming Data Lambda number
 int totalInFiberNum
          Field totalInFiberNum - Total Incoming Fiber number
 double totalOutBandWidth
          Field totalOutBandWidth - Total outgoing bandwidth
 double totalOutControlChannelBandWidth
          Field totalOutControlChannelBandWidth - Totoal outgoing control channel bandwidth
 int totalOutControlLambdaNum
          Field totalOutControlLambdaNum - Total Outgoing control lambda number
 int totalOutDataLambdaNum
          Field totalOutDataLambdaNum - Total Outgoing data lambda number
 int totalOutFiberNum
          Field totalOutFiberNum - Total Outgoing Fiber number
 
Constructor Summary
MPLSOpticalInterface(MPLSInterfaceInfo info)
          Creates an instance of the class MPLSOpticalInterface.
 
Method Summary
 void flushFile()
          Method flushFile Output the log to file
 double getBandwidth(int fiberid, int lambdaid)
          Method getBandwidth Retrieve the Bandwidth information
 double getBlockBytes(int fiberid, int lambdaid)
          Method getBlockBytes Retrieves the Block bytes
 long getBlockCounts(int fiberid, int lambdaid)
          Method getBlockCounts Retrieves the Block counts
 Lambda getInLambda(int fiberid, int lambdaid)
          Method getInLambda Get Incoming Lambda
 int getLabel(double bandwidth)
          Method getLabel Generatge the Label value
 MPLSOpticalInterface.LambdaInfo getLambda(int fiberid, int lambdaid, java.util.Hashtable table)
          Method getLambda Retrieves the Lambda Object
 java.lang.String getOpticalIfaceInfo()
          Method getOpticalIfaceInfo Get the Optical Information Message
 Lambda getOutLambda(int fiberid, int lambdaid)
          Method getOutLambda Return the Outgoing Lambda
 boolean isAvailableInResource(double bandwidth)
          Method isAvailableInResource Check that there is enough incoming bandwidth
 boolean isAvailableOutResource(double bandwidth)
          Method isAvailableOutResource Check there is enough outgoing bandwidth
 boolean isControlChannel(int fiberid, int lambdaid)
          Method isControlChannel Check whether this path is control channel or not
 void Monitoring(double ctime)
          Method Monitoring Do monitoring
 boolean push(ProtocolMessage message, ProtocolSession fromSession)
          Method push Put the message to the proper interface
 boolean pushControlChannel(ProtocolMessage message, ProtocolSession fromSession)
          Method pushControlChannel Push the control packet to the proper session
 boolean releaseInBandwidth(int fiberid, int lambdaid)
          Method releaseInBandwidth Release Incoming Bandwidth
 boolean releaseOutBandwidth(int fiberid, int lambdaid)
          Method releaseOutBandwidth Release the Outgoing bandwidth
 boolean reserveBandwidth(int fiberid, int lambdaid)
          Method reserveBandwidth Reserve bandwidth
 void setOpticalNic()
          Method setOpticalNic
 void setupLogFile(java.io.File interfacedir)
          Method setupLogFile Setup Log File
 void updateTrafficInfo(boolean isout, int fiberid, int lambdaid, double bytes)
          Method updateTrafficInfo Update monitored traffic information
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mplsMgmt

public MPLSMgmt mplsMgmt
Field mplsmgmt - MPLS Management Information


ifaceInfo

MPLSInterfaceInfo ifaceInfo
Field ifaceInfo - MPLS Interface Information


onic

ONIC onic
Field onic - Optical NIC


NodeType

int NodeType
Field NodeType - Node type


inFiberTable

public java.util.Hashtable inFiberTable
Field inFiberTable - Incoming Fiber Table


outFiberTable

public java.util.Hashtable outFiberTable
Field outFiberTable - Outgoing Fiber Table


inControlChannelTable

public java.util.Vector inControlChannelTable
Field inControlChannelTable - Incoming Control channel table


outControlChannelTable

public java.util.Vector outControlChannelTable
Field outControlChannelTable - Outgoing Control channel Table


totalInFiberNum

public int totalInFiberNum
Field totalInFiberNum - Total Incoming Fiber number


totalInDataLambdaNum

public int totalInDataLambdaNum
Field totalInDataLambdaNum - Total Incoming Data Lambda number


totalInControlLambdaNum

public int totalInControlLambdaNum
Field totalInControlLambdaNum - Total Incoming Control Lambda Number


totalInBandWidth

public double totalInBandWidth
Field totalInBandWidth - Total Incoming bandwidth


availableInBandWidth

public double availableInBandWidth
Field availableInBandWidth - Available incoming bandwidth


totalInControlChannelBandWidth

public double totalInControlChannelBandWidth
Field totalInControlChannelBandWidth - Total Incoming Control channel bandwidth


totalOutFiberNum

public int totalOutFiberNum
Field totalOutFiberNum - Total Outgoing Fiber number


totalOutDataLambdaNum

public int totalOutDataLambdaNum
Field totalOutDataLambdaNum - Total Outgoing data lambda number


totalOutControlLambdaNum

public int totalOutControlLambdaNum
Field totalOutControlLambdaNum - Total Outgoing control lambda number


totalOutBandWidth

public double totalOutBandWidth
Field totalOutBandWidth - Total outgoing bandwidth


availableOutBandWidth

public double availableOutBandWidth
Field availableOutBandWidth - Available outgoing bandwidth


totalOutControlChannelBandWidth

public double totalOutControlChannelBandWidth
Field totalOutControlChannelBandWidth - Totoal outgoing control channel bandwidth

Constructor Detail

MPLSOpticalInterface

public MPLSOpticalInterface(MPLSInterfaceInfo info)
Creates an instance of the class MPLSOpticalInterface.

Parameters:
info - the MPLSInterfaceInfo.
Method Detail

setOpticalNic

public void setOpticalNic()
Method setOpticalNic


getOutLambda

public Lambda getOutLambda(int fiberid,
                           int lambdaid)
Method getOutLambda Return the Outgoing Lambda

Parameters:
fiberid - - Fiber ID
lambdaid - - Lambda ID
Returns:
Lambda - Lambda Object

getInLambda

public Lambda getInLambda(int fiberid,
                          int lambdaid)
Method getInLambda Get Incoming Lambda

Parameters:
fiberid - - Fiber ID
lambdaid - - Lambda ID
Returns:
Lambda

getLambda

public MPLSOpticalInterface.LambdaInfo getLambda(int fiberid,
                                                 int lambdaid,
                                                 java.util.Hashtable table)
Method getLambda Retrieves the Lambda Object

Parameters:
fiberid - - Fiber ID
lambdaid - - Lambda ID
table - - Fiber Table
Returns:
LambdaInfo

getLabel

public int getLabel(double bandwidth)
Method getLabel Generatge the Label value

Parameters:
bandwidth -
Returns:
int - Label value

isAvailableInResource

public boolean isAvailableInResource(double bandwidth)
Method isAvailableInResource Check that there is enough incoming bandwidth

Parameters:
bandwidth - - Requried bandwidth
Returns:
boolean - True if there is enough bandwidth

isAvailableOutResource

public boolean isAvailableOutResource(double bandwidth)
Method isAvailableOutResource Check there is enough outgoing bandwidth

Parameters:
bandwidth - - Required bandwidth
Returns:
boolean - True if there is enough bandwidth

reserveBandwidth

public boolean reserveBandwidth(int fiberid,
                                int lambdaid)
Method reserveBandwidth Reserve bandwidth

Parameters:
fiberid - - Fiber ID
lambdaid - - Lambda ID
Returns:
boolean - True if success

getBandwidth

public double getBandwidth(int fiberid,
                           int lambdaid)
Method getBandwidth Retrieve the Bandwidth information

Parameters:
fiberid - - Fiber ID
lambdaid - - Lambda ID
Returns:
double - retrieved bandwidth

releaseOutBandwidth

public boolean releaseOutBandwidth(int fiberid,
                                   int lambdaid)
Method releaseOutBandwidth Release the Outgoing bandwidth

Parameters:
fiberid - - Fiber ID
lambdaid - - Lambda ID
Returns:
boolean - True if success

releaseInBandwidth

public boolean releaseInBandwidth(int fiberid,
                                  int lambdaid)
Method releaseInBandwidth Release Incoming Bandwidth

Parameters:
fiberid - - Fiber ID
lambdaid - - Lambda ID
Returns:
boolean - True if success

push

public boolean push(ProtocolMessage message,
                    ProtocolSession fromSession)
Method push Put the message to the proper interface

Parameters:
message -
fromSession -
Returns:
boolean - True if success

pushControlChannel

public boolean pushControlChannel(ProtocolMessage message,
                                  ProtocolSession fromSession)
Method pushControlChannel Push the control packet to the proper session

Parameters:
message -
fromSession -
Returns:
boolean - True if success

getBlockBytes

public double getBlockBytes(int fiberid,
                            int lambdaid)
Method getBlockBytes Retrieves the Block bytes

Parameters:
fiberid - - Fiber ID
lambdaid - - Lambda ID
Returns:
double - Retrieved value

getBlockCounts

public long getBlockCounts(int fiberid,
                           int lambdaid)
Method getBlockCounts Retrieves the Block counts

Parameters:
fiberid - - Fiber ID
lambdaid - - Lambda ID
Returns:
long - XXX

isControlChannel

public boolean isControlChannel(int fiberid,
                                int lambdaid)
Method isControlChannel Check whether this path is control channel or not

Parameters:
fiberid -
lambdaid -
Returns:
boolean - True if it is control channel

getOpticalIfaceInfo

public java.lang.String getOpticalIfaceInfo()
Method getOpticalIfaceInfo Get the Optical Information Message

Returns:
String - XXX

updateTrafficInfo

public void updateTrafficInfo(boolean isout,
                              int fiberid,
                              int lambdaid,
                              double bytes)
Method updateTrafficInfo Update monitored traffic information

Parameters:
isout - - ture if outgoing interface
fiberid - - Fiber ID
lambdaid - - Lambda ID
bytes - - Updated bytes

setupLogFile

public void setupLogFile(java.io.File interfacedir)
Method setupLogFile Setup Log File

Parameters:
interfacedir - - XXX

Monitoring

public void Monitoring(double ctime)
Method Monitoring Do monitoring

Parameters:
ctime - - Current Time

flushFile

public void flushFile()
Method flushFile Output the log to file