gov.nist.antd.merlin.generator.traffic
Class TrafficManager

java.lang.Object
  |
  +--SSF.OS.ProtocolSession
        |
        +--gov.nist.antd.merlin.generator.traffic.TrafficManager
All Implemented Interfaces:
com.renesys.raceway.DML.Configurable, DMLDump

public class TrafficManager
extends ProtocolSession
implements DMLDump

This protocol session allow the plug in of traffic generators.

 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
 TrafficGenerator generator
          The TrafficGenerator that will request connections.
 
Fields inherited from class SSF.OS.ProtocolSession
name, use
 
Constructor Summary
TrafficManager()
          Default constructor
 
Method Summary
 void config(com.renesys.raceway.DML.Configuration cfg)
          Configure this ProtocolSession.
 OpticalConnection createTraffic(TrafficParameter parameter)
          Create a connection request and send a message.
 TrafficGenerator getGenerator()
          Return the TrafficGenerator.
 void init()
          Initialise the event generator
 boolean push(ProtocolMessage message, ProtocolSession fromSession)
          Print the message received.
 void setGenerator(TrafficGenerator generator)
          Set the TrafficGenerator.
 java.lang.String toDML()
          This method generates the DML representation 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

generator

public TrafficGenerator generator
The TrafficGenerator that will request connections.

Constructor Detail

TrafficManager

public TrafficManager()
Default constructor

Method Detail

config

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

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

init

public void init()
          throws ProtocolException
Initialise the event generator

Overrides:
init in class ProtocolSession
ProtocolException

push

public boolean push(ProtocolMessage message,
                    ProtocolSession fromSession)
             throws ProtocolException
Print the message received.

Specified by:
push in class ProtocolSession
Parameters:
message - The message received.
fromSession - The ProtocolSession that pushed the message.
Returns:
True because the message is received.
ProtocolException

createTraffic

public OpticalConnection createTraffic(TrafficParameter parameter)
Create a connection request and send a message.

Parameters:
parameter - The traffic parameter
Returns:
the optical route created or null

setGenerator

public void setGenerator(TrafficGenerator generator)
Set the TrafficGenerator.

Parameters:
generator - The TrafficGenerator.

getGenerator

public TrafficGenerator getGenerator()
Return the TrafficGenerator.

Returns:
The TrafficGenerator.

toDML

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

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