public class DoneEvent extends ReplyEvent
Aside the normal MessageEvent attributes the following attributes
are delivered with a done events:
ErrorEvent may not have a false success
field. For the case of unknown errors the success field must be set after
the instantiation of the done event.900 1 965054163000 131.130.36.79 131.130.36.73 105 965054152000 1In the example above, computer 131.130.36.79 completes the position command 105 within 10 seconds.
| Modifier and Type | Field and Description |
|---|---|
private boolean |
commandSuccess
The success of the progenitor command.
|
static String |
DONETYPE
The type of a done event.
|
private static String |
FALSE
The string to use for unsuccessful done events.
|
private static String |
TRUE
The string to use for successful done events.
|
VARSEPSEPCHARlocalHost, sourceNamesource| Constructor and Description |
|---|
DoneEvent(Object src,
long time,
CommandEvent cmd)
Constructs a done event as an answer for the given command.
|
DoneEvent(Object src,
long time,
String ctype,
long ctime)
Constructs a done event and defaults to successful completion.
|
DoneEvent(Object src,
String type,
long time)
The default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String[] |
getLine()
Returns the command line.
|
boolean |
isSuccess()
Returns the completion time for the progenitor command, in ms.
|
boolean |
parseLine(String[] all)
Parses the acknowledge event progenitor command from the command line.
|
void |
setSuccess(boolean success)
Sets the completion time for the progenitor command, in ms.
|
createMatch, createReply, equals, getCommandTime, getCommandType, getExecuteGroupKey, getProgenitor, getReplyMatch, matches, parseProgenitor, setCommandTime, setCommandTypecheckType, equalTime, equalTime, fromAscii, getAllCommandLines, getHead, getNr, getTime, getType, hashCode, isValid, parseFromSingleString, readFromBufferedStream, setNr, setTime, setType, setValid, toSkippedString, toStringgetHost, getSourceName, setSourceNamegetSourcepublic static final String DONETYPE
private static final String TRUE
private static final String FALSE
private boolean commandSuccess
public DoneEvent(Object src, long time, CommandEvent cmd)
src - The origin of the acknowledge event.type - The type of the acknowledge event (901 and up).time - The time-tag of the acknowledge event.cmd - The command this acknowledge follows.public DoneEvent(Object src, long time, String ctype, long ctime)
src - The origin of the acknowledge event.type - The type of the acknowledge event (901 and up).time - The time-tag of the acknowledge event.ctype - The command-type of the original command.ctime - The command-time-tag of the original command.public void setSuccess(boolean success)
public boolean isSuccess()
public boolean parseLine(String[] all)
parseLine in class MessageEventpublic String[] getLine()
getLine in class MessageEvent