public class AcknowledgeEvent extends ReplyEvent
Aside the normal MessageEvent attributes the following attributes
are delivered with an acknowledge events:
901 1 965054153000 131.130.36.79 131.130.36.73 105 965054152000 300000In the example above, computer 131.130.36.79 will complete the position command 105 within 5 minutes. It took 1 sec for the acknowledge message to be generated, notable from the date tag in the message header.
Real acknowledge event will have different completion times. After
construction using the standard constructors only a default completion
time of DEFCOMPLETION is set.
| Modifier and Type | Field and Description |
|---|---|
private long |
completionTime
The completion time for this acknowledge event.
|
static long |
DEFCOMPLETION
A very default completion time.
|
static String |
PRIMARY_ACK
Any acknowledge event starts with this string.
|
VARSEPSEPCHARlocalHost, sourceNamesource| Constructor and Description |
|---|
AcknowledgeEvent(Object src,
String type,
long time)
The default constructor.
|
AcknowledgeEvent(Object src,
String type,
long time,
CommandEvent cmd)
Constructs an acknowledge event as an answer for the given command.
|
AcknowledgeEvent(Object src,
String type,
long time,
CommandEvent cmd,
long complete)
Constructs an acknowledge event as an answer for the given command.
|
AcknowledgeEvent(Object src,
String type,
long time,
String ctype,
long ctime)
Constructs an acknowledge event with the default completion time.
|
AcknowledgeEvent(Object src,
String type,
long time,
String ctype,
long ctime,
long complete)
Constructs a fully qualified acknowledge event.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getCompletionTime()
Returns the completion time for the progenitor command, in ms.
|
String[] |
getLine()
Returns the command line.
|
boolean |
parseLine(String[] all)
Parses the acknowledge event progenitor command from the command line.
|
protected void |
setCompletionTime(long comp)
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 PRIMARY_ACK
public static final long DEFCOMPLETION
private long completionTime
public AcknowledgeEvent(Object src, String type, long time)
public AcknowledgeEvent(Object src, String type, 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 AcknowledgeEvent(Object src, String type, long time, CommandEvent cmd, long complete)
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.complete - The completion time for the original command.public AcknowledgeEvent(Object src, String type, 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 AcknowledgeEvent(Object src, String type, long time, String ctype, long ctime, long complete)
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.complete - The completion time for the original command.protected void setCompletionTime(long comp)
public long getCompletionTime()
public boolean parseLine(String[] all)
parseLine in class MessageEventpublic String[] getLine()
getLine in class MessageEvent