public abstract class ReplyEvent extends MessageEvent
getExecuteGroupKey() method which
returns equal objects when invoked on different messages belonging to
one execution block. I.e. any command/acknowledge/done sequence will
return the same key with this method call.| Modifier and Type | Field and Description |
|---|---|
private long |
commandTime
The command time tag this acknowledge event follows.
|
private String |
commandType
The command type this acknowledge event follows.
|
static char |
VARSEP
The seperator char for combining reply type and command type.
|
SEPCHARlocalHost, sourceNamesource| Modifier | Constructor and Description |
|---|---|
protected |
ReplyEvent(Object src,
String type,
long time)
Constructs a reply event as an answer for the given command.
|
| Modifier and Type | Method and Description |
|---|---|
static ReplyEvent |
createMatch(Object src,
String type,
long time,
CommandEvent to)
Creates a reply match.
|
static ReplyEvent |
createReply(MessageBin bin)
Creates a non-abstract subclass of a reply event from a
MessageBin object. |
boolean |
equals(Object that)
Test additionally for equality of command type and command time
progenitor equality.
|
long |
getCommandTime()
Returns the command time-tag of the progenitor command.
|
String |
getCommandType()
Returns the command type of the progenitor command.
|
Object |
getExecuteGroupKey()
Returns a simple key for comparison in a hash table.
|
protected String |
getProgenitor()
Returns the string representation of the progenitor command.
|
String |
getReplyMatch()
Returns the type of this reply and the type of the command in
a single string.
|
boolean |
matches(ReplyEvent that)
Checks if this reply event matches the argument one.
|
protected boolean |
parseProgenitor(String cl)
Parses the command type and the command time of the progenitor command
from a single String.
|
protected void |
setCommandTime(long ctime)
Sets the time-tag of the progenitor command.
|
protected void |
setCommandType(String ctype)
Sets the type of the progenitor command.
|
checkType, equalTime, equalTime, fromAscii, getAllCommandLines, getHead, getLine, getNr, getTime, getType, hashCode, isValid, parseFromSingleString, parseLine, readFromBufferedStream, setNr, setTime, setType, setValid, toSkippedString, toStringgetHost, getSourceName, setSourceNamegetSourcepublic static final char VARSEP
private String commandType
private long commandTime
protected void setCommandType(String ctype)
protected void setCommandTime(long ctime)
public static ReplyEvent createReply(MessageBin bin)
MessageBin object.public static ReplyEvent createMatch(Object src, String type, long time, CommandEvent to)
matches(stella.ReplyEvent) method.protected boolean parseProgenitor(String cl)
MessageEvent.SEPCHAR. The command time is parsed from the
long immediately following the separator char.protected String getProgenitor()
public String getCommandType()
public long getCommandTime()
public String getReplyMatch()
public Object getExecuteGroupKey()
getExecuteGroupKey in class MessageEventpublic boolean matches(ReplyEvent that)
public boolean equals(Object that)
equals in class MessageEventthat - The Object to compare to.MessageEvent.equalTime(long)