input
Class DTN2Events

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

public class DTN2Events
extends java.lang.Object
implements EventQueue

Delivers bundles from dtnd to ONE. Must be configured as an external events generator in the configuration file.


Nested Class Summary
 class DTN2Events.ParserHandler
          Inner class that implements the CLA interface for receiving bundles from dtnd.
 
Constructor Summary
DTN2Events(Settings s)
          Creates a new events object.
 
Method Summary
 DTN2Events.ParserHandler getParserHandler(int hostID, java.lang.String consoleHost, int consolePort)
          Creates a parser handler for the given host.
 ExternalEvent nextEvent()
          Returns the next event in the queue or ExternalEvent with time of double.MAX_VALUE if there are no events left.
 double nextEventsTime()
          Returns next event's time or Double.MAX_VALUE if there are no events left in the queue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DTN2Events

public DTN2Events(Settings s)
Creates a new events object.

Parameters:
s - Settings
Method Detail

nextEvent

public ExternalEvent nextEvent()
Description copied from interface: EventQueue
Returns the next event in the queue or ExternalEvent with time of double.MAX_VALUE if there are no events left.

Specified by:
nextEvent in interface EventQueue
Returns:
The next event

nextEventsTime

public double nextEventsTime()
Description copied from interface: EventQueue
Returns next event's time or Double.MAX_VALUE if there are no events left in the queue.

Specified by:
nextEventsTime in interface EventQueue
Returns:
Next event's time

getParserHandler

public DTN2Events.ParserHandler getParserHandler(int hostID,
                                                 java.lang.String consoleHost,
                                                 int consolePort)
Creates a parser handler for the given host.

Parameters:
hostID - ID of the host that this parser corresponds to
consoleHost - Hostname of the dtnd
consolePort - Console port of the dtnd