|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
util.rmi.RmiEvent
stella.MessageEvent
stella.ReplyEvent
public abstract class ReplyEvent
A intermediate class between the pure message event class and the
acknowledge and done events. This class carries information of the
command it follows within its command-time-tag and the command-type fields.
This behaviour is reflected in the 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.
| Field Summary | |
|---|---|
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. |
| Fields inherited from class stella.MessageEvent |
|---|
SEPCHAR |
| Fields inherited from class util.rmi.RmiEvent |
|---|
localHost, sourceName |
| Fields inherited from class java.util.EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
protected |
ReplyEvent(Object src,
String type,
long time)
Constructs a reply event as an answer for the given command. |
| Method Summary | |
|---|---|
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. |
| Methods inherited from class stella.MessageEvent |
|---|
checkType, equalTime, equalTime, fromAscii, getAllCommandLines, getHead, getLine, getNr, getTime, getType, hashCode, isValid, parseFromSingleString, parseLine, readFromBufferedStream, setNr, setTime, setType, setValid, toString |
| Methods inherited from class util.rmi.RmiEvent |
|---|
getHost, getSourceName, setSourceName |
| Methods inherited from class java.util.EventObject |
|---|
getSource |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final char VARSEP
private String commandType
private long commandTime
| Constructor Detail |
|---|
protected ReplyEvent(Object src,
String type,
long time)
src - The origin of the reply event.type - The type of the reply event.time - The time-tag of the reply event.| Method Detail |
|---|
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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||