public class Message extends Object
Constructor and Description |
---|
Message() |
Modifier and Type | Method and Description |
---|---|
String |
getContent() |
org.joda.time.DateTime |
getDate() |
Person |
getDestination() |
User |
getSource() |
MessageStatus |
getStatus() |
void |
send()
Send the message to the destination by using the configured
MessagingService implementation. |
void |
setContent(String content) |
void |
setDate(org.joda.time.DateTime date) |
void |
setDestination(Person destination) |
void |
setDestination(User destination) |
void |
setSource(User source) |
void |
setStatus(MessageStatus status) |
public void send()
MessagingService
implementation.
Only messages having their status
MessageStatus.DRAFT
can
be sent. For any other status a UnsupportedOperationException
is
thrown.public User getSource()
public void setSource(User source)
public Person getDestination()
public void setDestination(User destination)
public String getContent()
public void setContent(String content)
public MessageStatus getStatus()
public org.joda.time.DateTime getDate()
public void setDate(org.joda.time.DateTime date)
public void setDestination(Person destination)
public void setStatus(MessageStatus status)