|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.root1.simon.codec.messages.AbstractMessage
public abstract class AbstractMessage
A base message for SIMON protocol messages. Error messages are not being sent via the errorMsg field: In case of a problems reading a message, the responsible decoder class will inject the error message, so that the ProcessMessageRunnable can react on that error accordingly.
| Constructor Summary | |
|---|---|
protected |
AbstractMessage(byte msgType)
Creates a new message decoder |
| Method Summary | |
|---|---|
java.lang.String |
getErrorMsg()
Returns the error message. |
byte |
getMsgType()
Returns the message type as described by SimonMessageConstants |
int |
getSequence()
Returns, guess what, the sequence id of the message |
boolean |
hasError()
Returns whether this message has an error or not |
void |
setErrorMsg(java.lang.String errorMsg)
Sets the error message related to this message |
void |
setSequence(int sequence)
Stores the sequence id in the message |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractMessage(byte msgType)
msgType - specifies a unique ID for the type of message| Method Detail |
|---|
public java.lang.String getErrorMsg()
Statics.NO_ERROR if no error is present.
public void setErrorMsg(java.lang.String errorMsg)
errorMsg - the errorMsg to setpublic boolean hasError()
public byte getMsgType()
SimonMessageConstants
public int getSequence()
public void setSequence(int sequence)
sequence - the sequence to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||