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

java.lang.Object
  |
  +--gov.nist.antd.merlin.generator.traffic.RandomTrafficGenerator
All Implemented Interfaces:
TrafficGenerator

public class RandomTrafficGenerator
extends java.lang.Object
implements TrafficGenerator

This class randomly generates connection requests. Using for test only. Request connections with a bandwidth of 1 Gigabyte using the routing algorithm ShortestPathDistance and the BestFit for wavelength assignment.

 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
private  boolean active
          Define if this generator is active (sends messages)
 
Constructor Summary
RandomTrafficGenerator()
          Default constructor
 
Method Summary
 void config(com.renesys.raceway.DML.Configuration cfg)
          Configure the TrafficGenerator out of the DML.
 void connectionManager(TrafficManager owner, OpticalConnection oRoute)
          Create a timer that will delete the connection.
 void init(TrafficManager owner)
          Initialise the TrafficGenerator
 boolean isActive()
          Return if the protocol is active
 void setActive(boolean value)
          Set the attribute active
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

active

private boolean active
Define if this generator is active (sends messages)

Constructor Detail

RandomTrafficGenerator

public RandomTrafficGenerator()
Default constructor

Method Detail

init

public void init(TrafficManager owner)
Initialise the TrafficGenerator

Specified by:
init in interface TrafficGenerator
Parameters:
owner - The TrafficManager that created this object

config

public void config(com.renesys.raceway.DML.Configuration cfg)
            throws com.renesys.raceway.DML.configException
Configure the TrafficGenerator out of the DML.

Specified by:
config in interface TrafficGenerator
Parameters:
cfg - The DML configuration.
Throws:
cfg - when a configuration error occurs.
com.renesys.raceway.DML.configException

setActive

public void setActive(boolean value)
Set the attribute active

Parameters:
value - The value for the attribute active

isActive

public boolean isActive()
Return if the protocol is active

Returns:
True if the protocol is active

connectionManager

public void connectionManager(TrafficManager owner,
                              OpticalConnection oRoute)
Create a timer that will delete the connection.

Parameters:
owner - The TrafficManager that created this object
oRoute - The optical route to delete.