|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.ac.ulg.montefiore.run.totem.topgen.traffic.AbstractTrafficGenerator
public abstract class AbstractTrafficGenerator
Traffic generator that can generate a specified number of matrices. Each matrix is routable thanks to SPF. A matrix that is not routable is computed again with a maximum number of times given by the maxTrials parameter.
Creation date: 29/10/2007
Field Summary | |
---|---|
protected Domain |
domain
|
protected java.util.List<Node> |
nodes
|
protected java.util.HashMap<java.lang.String,java.lang.String> |
parameters
|
protected static java.util.ArrayList<ParameterDescriptor> |
params
|
Constructor Summary | |
---|---|
AbstractTrafficGenerator()
|
Method Summary | |
---|---|
protected abstract TrafficMatrix |
buildTM()
Build a TrafficMatrix. |
protected ParameterDescriptor |
findParam(java.lang.String name)
|
java.util.List<TrafficMatrix> |
generate()
Generate a traffic matric based on the paremeters. |
java.util.List<ParameterDescriptor> |
getAvailableParameters()
Returns a list of parameters that can be used with the generator. |
java.lang.String |
getParam(java.lang.String name)
get the value of the specified parameter. |
protected abstract void |
initialize_generation()
Initialize the generation of traffic matrices. |
void |
setParam(java.lang.String name,
java.lang.String value)
set user parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.util.ArrayList<ParameterDescriptor> params
protected java.util.HashMap<java.lang.String,java.lang.String> parameters
protected Domain domain
protected java.util.List<Node> nodes
Constructor Detail |
---|
public AbstractTrafficGenerator()
Method Detail |
---|
protected ParameterDescriptor findParam(java.lang.String name)
public void setParam(java.lang.String name, java.lang.String value) throws InvalidParameterException
TrafficGeneratorInterface
setParam
in interface TrafficGeneratorInterface
name
- name of the parameter.value
- value of the parameter.
InvalidParameterException
- If the parameter is invalid.public java.lang.String getParam(java.lang.String name) throws InvalidParameterException
TrafficGeneratorInterface
getParam
in interface TrafficGeneratorInterface
name
- name of the parameter.
InvalidParameterException
- If the parameter is invalid.public java.util.List<TrafficMatrix> generate() throws TrafficGenerationException
initialize_generation()
is called at first,
Then method buildTM()
is called for each matrix generation.
generate
in interface TrafficGeneratorInterface
TrafficGenerationException
protected abstract TrafficMatrix buildTM() throws TMBuildingException
TMBuildingException
protected abstract void initialize_generation() throws InvalidParameterException
InvalidParameterException
public java.util.List<ParameterDescriptor> getAvailableParameters()
TrafficGeneratorInterface
getAvailableParameters
in interface TrafficGeneratorInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |