|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object anon.util.AbstractMessage
public abstract class AbstractMessage
This is a generic message implementation. Messages normally are used by observed objects when calling the update() method of the observers (but there are also other usage scenarios possible). Thus it is possible to send the reason for the update() call. Messages have a message code containing the reason for the update. Also there is the possibility to append an Object to the message with more detailed information. The message codes and the usage of the appended object are defined within the children of this class.
Field Summary | |
---|---|
private int |
m_messageCode
Stores the message code. |
private java.lang.Object |
m_messageData
Stores some message data, which maybe was sent with the message. |
Constructor Summary | |
---|---|
protected |
AbstractMessage(int a_messageCode)
This creates a new AbstractMessage. |
protected |
AbstractMessage(int a_messageCode,
java.lang.Object a_messageData)
This creates a new AbstractMessage. |
Method Summary | |
---|---|
int |
getMessageCode()
This returns the message code of this message. |
java.lang.Object |
getMessageData()
Returns the message data, which was sent with the message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int m_messageCode
private java.lang.Object m_messageData
Constructor Detail |
---|
protected AbstractMessage(int a_messageCode)
a_messageCode
- The message code.protected AbstractMessage(int a_messageCode, java.lang.Object a_messageData)
a_messageCode
- The message code.a_messageData
- The data to send with the message.Method Detail |
---|
public int getMessageCode()
public java.lang.Object getMessageData()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |