FileDocCategorySizeDatePackage
Message.javaAPI DocphoneME MR2 API (J2ME)2852Wed May 02 18:00:32 BST 2007com.sun.tck.wma

Message

public interface Message
This is the base interface for derived interfaces representing various types of messages.

Fields Summary
Constructors Summary
Methods Summary
public java.lang.StringgetAddress()
Returns the address that this message is associated with.

If this object represents a message to be sent, this address is the recipient's address.

If this object represents a message has been received, this address is the address of the sender.

If the address for the message isn't set, null is returned.

Note: Sending responses to a received message is allowed easily by this design through reusing the same Message object with the replaced payload. Unless a special processing of the address is required by the mesaging protocol that is used, the address field can be left untouched.

return
null if the address isn't set, or this message's address.
see
#setAddress(String)

public java.util.DategetTimestamp()
Returns the timestamp that indicates when this message has been sent.

return
null either if the timestamp isn't set or it isn't available in the underlying protocol message, or Date that indicates the timestamp in the message.

public voidsetAddress(java.lang.String addr)
Sets the address that this message is associated with, i.e., the address that getAddress method returns. null is allowed as an address.

param
addr address for the message
see
#getAddress()