|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.android.messaging.MessageImpl
public class MessageImpl
Provides basic Message implementation.
| Field Summary | |
|---|---|
protected String |
address
|
protected Date |
timestamp
|
| Constructor Summary | |
|---|---|
MessageImpl(String address,
Date timestamp)
|
|
| Method Summary | |
|---|---|
String |
getAddress()
Returns the address associated with this message. |
Date |
getTimestamp()
Returns the timestamp indicating when this message has been sent. |
void |
setAddress(String addr)
Sets the address associated with this message, that is, the address returned by the getAddress method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String address
protected Date timestamp
| Constructor Detail |
|---|
public MessageImpl(String address,
Date timestamp)
| Method Detail |
|---|
public Date getTimestamp()
Message
getTimestamp in interface Messagepublic String getAddress()
MessageIf this is a message to be sent, then this address is the recipient's address.
If this is a message that has been received, then this address is the sender's address.
Returns null, if the address for the message
is not set.
Note: This design allows responses to be
sent to a received message by reusing the
same Message object and just replacing the
payload. The address field can normally be
kept untouched (unless the messaging protocol
requires some special handling of the address).
getAddress in interface MessageMessage.setAddress(String)public void setAddress(String addr)
MessagegetAddress method.
The address may be set to null.
setAddress in interface Messageaddr - - address for the messageMessage.getAddress()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||