public class DTN2Manager
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DTN2Manager.EIDHost
EID to DTNHost mapping elements.
|
| Constructor and Description |
|---|
DTN2Manager() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addBundle(java.lang.String id,
Bundle bundle)
Stores a reference to a bundle corresponding to the given message.
|
static Bundle |
getBundle(java.lang.String id)
Returns the bundle associated with the given message id.
|
static DTN2Events |
getEvents()
Returns the DTN2Events object.
|
static java.util.Collection<DTN2Manager.EIDHost> |
getHosts(java.lang.String EID)
Returns a
Collection of DTNHost
objects corresponding to the given EID. |
static CLAParser |
getParser(DTNHost host)
Returns the ECL parser associated with the host.
|
static DTN2Reporter |
getReporter()
Returns reference to the
DTN2Reporter object. |
static void |
setEvents(DTN2Events events)
Sets the DTN2Events object.
|
static void |
setReporter(DTN2Reporter reporter)
Sets the
DTN2Reporter object used to pass messages from ONE
to dtnd. |
static void |
setup(World world)
Sets up the dtnd connections by parsing the configuration file
defined in the
DTN2.configFile setting. |
public static void setup(World world)
DTN2.configFile setting.world - reference to the world that contains the nodespublic static void setReporter(DTN2Reporter reporter)
DTN2Reporter object used to pass messages from ONE
to dtnd.
This should be used by the dynamically loaded DTN2Reporter object to
allow other objects get reference to it.reporter - the reporter object to save reference topublic static DTN2Reporter getReporter()
DTN2Reporter object.public static void setEvents(DTN2Events events)
events - the active events object to usepublic static DTN2Events getEvents()
public static CLAParser getParser(DTNHost host)
host - the host who's parser to returnpublic static java.util.Collection<DTN2Manager.EIDHost> getHosts(java.lang.String EID)
Collection of DTNHost
objects corresponding to the given EID.EID - EID of the hostpublic static void addBundle(java.lang.String id,
Bundle bundle)
id - the id of the messagebundle - the bundle associated with the messagepublic static Bundle getBundle(java.lang.String id)
id - the message id