|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Base interface representing a message
This interface contains the functionality common to all messages. Concrete object instances representing a message will typically implement other (sub)interfaces providing access to the content and other information in the message which is dependent on the type of the message.
Object instances implementing this interface are just containers for the data that is passed in. The setXxx() methods just set the values of the parameters in the data container without any checking whether the value is valid in any way for the respective parameter.
Method Summary | |
java.lang.String |
getAddress()
Returns the address associated with this message. |
java.util.Date |
getTimestamp()
Returns the timestamp indicating when this message has been sent. |
void |
setAddress(java.lang.String addr)
Sets the message associated with this message, i.e. the address returned by the getAddress method. |
Method Detail |
public java.lang.String getAddress()
Returns the address associated with this message.
If this is a message to be sent, this address is the address of the recipient.
If this is a message that has been received, this address is the sender's address.
Returns null if the address for the message is not set.
Note: This design allows sending responses to a received message easily by reusing the same Message object and just replacing the payload. The address field can normally be kept untouched (unless the used messaging protocol requires some special handling of the address).
public void setAddress(java.lang.String addr)
addr
- address for the messagepublic java.util.Date getTimestamp()
|
forum.nokia.com/java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |