|
||||||||||
| 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.MessageBin
public class MessageBin
A helper class for temporarly collecting all info from a message
event into a container. Used for constructing fully-qualified
subclasses of the message event class from a string representation.
E.g. if a command is sent over its ascii-representation you create a
message bin object by reading the wire. The receiving class, which
knows which subclass of message to expect (ErrorEvent,
CommandEvent, or ReplyEvent), may than create the
fully qualified message by passing it to one of the static
create... methods in the appropriate subclass.
The command lines read in are stored in a temporarly copy and are
retrieved as usually with getLine(). Parsing is not
possible. Calling this method accidentally results in a
UnsupportedOperationException to be thrown.
| Field Summary | |
|---|---|
private String[] |
line
The command lines read in, unparsed. |
| 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 | |
|---|---|
MessageBin(Object src,
String type,
long time)
Creates a new message bin object for temporaly reference |
|
| Method Summary | |
|---|---|
String[] |
getLine()
Returns the command-line(s) copy read in from the stream. |
boolean |
isReferAcknowledge()
Allows classes to judge if this message bin referes to an acknowledge event. |
boolean |
isReferCommand()
A helper method that tries to figure out if this message bin is referring to a command event. |
boolean |
isReferDone()
Allows classes to judge if this message bin referes to a done event. |
boolean |
isReferError()
Allows classes to judge if this message bin referes to an error event. |
boolean |
isReferInfo()
Allows classes to judge if this message bin referes to an info event. |
boolean |
parseLine(String[] dummy)
Parsing is not allowed. |
protected void |
setLine(String[] cl)
Sets the temporarly command line buffer. |
| Methods inherited from class stella.MessageEvent |
|---|
checkType, equals, equalTime, equalTime, fromAscii, getAllCommandLines, getExecuteGroupKey, getHead, getNr, getTime, getType, hashCode, isValid, parseFromSingleString, 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 |
|---|
private String[] line
| Constructor Detail |
|---|
public MessageBin(Object src,
String type,
long time)
| Method Detail |
|---|
public String[] getLine()
getLine in class MessageEventprotected void setLine(String[] cl)
public boolean parseLine(String[] dummy)
parseLine in class MessageEventpublic boolean isReferError()
public boolean isReferInfo()
public boolean isReferAcknowledge()
public boolean isReferDone()
public boolean isReferCommand()
isReferError(),
isReferInfo(), isReferAcknowledge(), and
isReferDone().
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||