|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinput.StandardEventsReader
public class StandardEventsReader
External events reader for standard-format events (created e.g by the dtnsim2parser).
Syntax:
<time> <actionId> <msgId> <hostId>
[<host2Id> [<size>] [<respSize>]]
All actions (except CONNECTION) must have first four fields. SEND, DELIVERED and ABORT actions need host2Id field too (the host who the message is/was being transferred to). CREATE action needs the additional size (of the message) field and can have also size-of-the-response field if a response to this message is requested.
CONNNECTION action is followed by the two hosts which connect (or disconnect) to each other and then either "up" or "down" depending on whether the connection was created or destroyed.
Message DROP and REMOVE events can use "*" as the message ID for referring to all messages the node has in message buffer (i.e., to delete all messages).
Field Summary | |
---|---|
static java.lang.String |
ABORT
Identifier of message transfer aborted event ("A") |
static java.lang.String |
ALL_MESSAGES_ID
Message identifier to use to refer to all messages ("*") |
static java.lang.String |
CONNECTION
Identifier of connection event ("CONN") |
static java.lang.String |
CONNECTION_DOWN
Value identifier of connection down event ("down") |
static java.lang.String |
CONNECTION_UP
Value identifier of connection up event ("up") |
static java.lang.String |
CREATE
Identifier of message creation event ("C") |
static java.lang.String |
DELIVERED
Identifier of message delivered event ("DE") |
static java.lang.String |
DROP
Identifier of message dropped event ("DR") |
static java.lang.String |
REMOVE
Identifier of message removed event ("R") |
static java.lang.String |
SEND
Identifier of message transfer start event ("S") |
Constructor Summary | |
---|---|
StandardEventsReader(java.io.File eventsFile)
|
Method Summary | |
---|---|
void |
close()
Closes the input file streams of the reader. |
java.util.List<ExternalEvent> |
readEvents(int nrof)
Read events from the reader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CREATE
public static final java.lang.String SEND
public static final java.lang.String DELIVERED
public static final java.lang.String ABORT
public static final java.lang.String DROP
public static final java.lang.String REMOVE
public static final java.lang.String CONNECTION
public static final java.lang.String CONNECTION_DOWN
public static final java.lang.String CONNECTION_UP
public static final java.lang.String ALL_MESSAGES_ID
Constructor Detail |
---|
public StandardEventsReader(java.io.File eventsFile)
Method Detail |
---|
public java.util.List<ExternalEvent> readEvents(int nrof)
ExternalEventsReader
readEvents
in interface ExternalEventsReader
nrof
- Maximum number of events to read
public void close()
ExternalEventsReader
close
in interface ExternalEventsReader
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |