gov.nist.antd.merlin.util
Class AbstractAddDropConfigurator

java.lang.Object
  |
  +--SSF.OS.ProtocolSession
        |
        +--gov.nist.antd.merlin.util.AbstractAddDropConfigurator
All Implemented Interfaces:
com.renesys.raceway.DML.Configurable, DMLDump
Direct Known Subclasses:
AutoConfigCtrl

public abstract class AbstractAddDropConfigurator
extends ProtocolSession
implements DMLDump

This abstract class helps in creating a protocol on top of OXCSwitch. It implements some mechanism to read addDropLamdbas.

 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:
borchert
, rouil

Field Summary
 java.util.Vector addLambdaIDs
          Store the addLambdas where to send messages
 java.util.Enumeration addLambdas
          Contains the configuration requests of the AddLambdas
 java.util.Vector dropLambdaIDs
          Store the dropLambdas where messages will be received
 java.util.Enumeration dropLambdas
          Contains the configuration requests of the AddLambdas
static java.lang.String SESSION_NAME
          The name (oxcswitch) of this protocolsession in the network.
 
Fields inherited from class SSF.OS.ProtocolSession
name, use
 
Constructor Summary
AbstractAddDropConfigurator()
          Default constructor
 
Method Summary
 void config(com.renesys.raceway.DML.Configuration cfg)
          Configuration
 int[] configAddDrop(com.renesys.raceway.DML.Configuration cfg)
          Read the configuration of AddDropLamdba
 java.util.Vector getAddLambdaIDs()
          Return the vector of addLambdas
 java.util.Enumeration getAddLambdas()
          Return the configuration of addLambdas
 java.util.Vector getDropLambdaIDs()
          Return the vector of dropLambdas
 java.util.Enumeration getDropLambdas()
          Return the configuration of dropLambdas
 void init()
          Initialization routine, called by the ProtocolGraph after instantiation.
abstract  boolean push(ProtocolMessage message, ProtocolSession fromSession)
          Regular push that cannot be used with framing adaptation.
 void setAddLambdas(java.util.Enumeration addLambdas)
          Store the addLambdas configuration.
 void setDropLambdas(java.util.Enumeration dropLambdas)
          Store the dropLambdas configuration.
 java.lang.String toDML()
          This method generates the DML configuration for the options of this class.
 
Methods inherited from class SSF.OS.ProtocolSession
close, closed, debugIdentifier, inGraph, open, opened, pushAfterDelay, pushAfterDelayFailed, setGraph, version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSION_NAME

public static final java.lang.String SESSION_NAME
The name (oxcswitch) of this protocolsession in the network.

See Also:
Constant Field Values

addLambdas

public java.util.Enumeration addLambdas
Contains the configuration requests of the AddLambdas


dropLambdas

public java.util.Enumeration dropLambdas
Contains the configuration requests of the AddLambdas


addLambdaIDs

public java.util.Vector addLambdaIDs
Store the addLambdas where to send messages


dropLambdaIDs

public java.util.Vector dropLambdaIDs
Store the dropLambdas where messages will be received

Constructor Detail

AbstractAddDropConfigurator

public AbstractAddDropConfigurator()
Default constructor

Method Detail

config

public void config(com.renesys.raceway.DML.Configuration cfg)
            throws com.renesys.raceway.DML.configException
Configuration

Specified by:
config in interface com.renesys.raceway.DML.Configurable
Overrides:
config in class ProtocolSession
Parameters:
cfg - The DML configuration
Throws:
if - a configuration error occurs
com.renesys.raceway.DML.configException

init

public void init()
          throws ProtocolException
Initialization routine, called by the ProtocolGraph after instantiation. The order of initialization of a set of protocols is unspecified, so other methods (like open()) may be called before init(). Resources (like connection tables) that may be needed by open() should therefore be created in the ProtocolSession constructor.

Overrides:
init in class ProtocolSession
ProtocolException

push

public abstract boolean push(ProtocolMessage message,
                             ProtocolSession fromSession)
                      throws ProtocolException
Regular push that cannot be used with framing adaptation.

Specified by:
push in class ProtocolSession
Parameters:
message - The message received.
fromSession - The protocol session which sent the message.
Returns:
True if the message is pushed. False if it is dropped.
Throws:
ProtocolException - If a protocol session exception occurs.

configAddDrop

public int[] configAddDrop(com.renesys.raceway.DML.Configuration cfg)
                    throws ProtocolException
Read the configuration of AddDropLamdba

Parameters:
cfg - The dml configuration
Returns:
The array of information portID, OnicID, fiberID, lambdaID
Throws:
ProtocolException - when a configuration error occurs

setAddLambdas

public void setAddLambdas(java.util.Enumeration addLambdas)
Store the addLambdas configuration.

Parameters:
addLambdas - The enumeration of addLambdas

setDropLambdas

public void setDropLambdas(java.util.Enumeration dropLambdas)
Store the dropLambdas configuration.

Parameters:
dropLambdas - The enumeration of dropLambdas

getAddLambdas

public java.util.Enumeration getAddLambdas()
Return the configuration of addLambdas

Returns:
the configuration of addLambdas

getDropLambdas

public java.util.Enumeration getDropLambdas()
Return the configuration of dropLambdas

Returns:
the configuration of dropLambdas

getAddLambdaIDs

public java.util.Vector getAddLambdaIDs()
Return the vector of addLambdas

Returns:
the vector of addLambdas

getDropLambdaIDs

public java.util.Vector getDropLambdaIDs()
Return the vector of dropLambdas

Returns:
the vector of dropLambdas

toDML

public java.lang.String toDML()
This method generates the DML configuration for the options of this class.

Specified by:
toDML in interface DMLDump
Returns:
The DML configuration as String