input
Class MessageEventGenerator

java.lang.Object
  extended by input.MessageEventGenerator
All Implemented Interfaces:
EventQueue

public class MessageEventGenerator
extends java.lang.Object
implements EventQueue

Message creation -external events generator. Creates uniformly distributed message creation patterns whose message size and inter-message intervals can be configured.


Field Summary
static java.lang.String HOST_RANGE_S
          Sender/receiver address range -setting id ("hosts").
static java.lang.String MESSAGE_ID_PREFIX_S
          Message ID prefix -setting id ("prefix").
static java.lang.String MESSAGE_INTERVAL_S
          Message creation interval range -setting id ("interval").
static java.lang.String MESSAGE_SIZE_S
          Message size range -setting id ("size").
protected  double nextEventsTime
          Time of the next event (simulated seconds)
 
Constructor Summary
MessageEventGenerator(Settings s)
          Constructor, initializes the interval between events, and the size of messages generated, as well as number of hosts in the network.
 
Method Summary
 ExternalEvent nextEvent()
          Returns the next message creation event
 double nextEventsTime()
          Returns next message creation event's time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE_SIZE_S

public static final java.lang.String MESSAGE_SIZE_S
Message size range -setting id ("size"). Can be either a single value or a range (min, max) of uniformly distributed random values. Defines the message size (bytes).

See Also:
Constant Field Values

MESSAGE_INTERVAL_S

public static final java.lang.String MESSAGE_INTERVAL_S
Message creation interval range -setting id ("interval"). Can be either a single value or a range (min, max) of uniformly distributed random values. Defines the inter-message creation interval (seconds).

See Also:
Constant Field Values

HOST_RANGE_S

public static final java.lang.String HOST_RANGE_S
Sender/receiver address range -setting id ("hosts").

See Also:
Constant Field Values

MESSAGE_ID_PREFIX_S

public static final java.lang.String MESSAGE_ID_PREFIX_S
Message ID prefix -setting id ("prefix"). The value must be unique for all message sources, so if you have more than one message generator, use different prefix for all of them.

See Also:
Constant Field Values

nextEventsTime

protected double nextEventsTime
Time of the next event (simulated seconds)

Constructor Detail

MessageEventGenerator

public MessageEventGenerator(Settings s)
Constructor, initializes the interval between events, and the size of messages generated, as well as number of hosts in the network.

Parameters:
s - Settings for this generator.
Method Detail

nextEvent

public ExternalEvent nextEvent()
Returns the next message creation event

Specified by:
nextEvent in interface EventQueue
Returns:
The next event
See Also:
EventQueue.nextEvent()

nextEventsTime

public double nextEventsTime()
Returns next message creation event's time

Specified by:
nextEventsTime in interface EventQueue
Returns:
Next event's time
See Also:
EventQueue.nextEventsTime()