|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jabber.jabberbeans.PacketBuilder | +--org.jabber.jabberbeans.MessageBuilder
This class is used to build the complex 'Message' object. After entering all the appropriate commands, you call build(), which returns a message object. Unlike most Builder Patterns, this is not used to create different types of objects. However, Message objects are meant to be immutable, and the complex creation (variable number and types of arguments) made this class much simpler.
Field Summary | |
private java.lang.String |
body
body of message. |
private java.lang.String |
subject
subject line of message |
private java.lang.String |
thread
thread identifier. |
Fields inherited from class org.jabber.jabberbeans.PacketBuilder |
errorCode,
errorText,
extensions,
fromAddress,
identifier,
toAddress,
type |
Constructor Summary | |
MessageBuilder()
|
Method Summary | |
Packet |
build()
Build a new Message object based on the current builder state. |
java.lang.String |
getBody()
get the message body |
java.lang.String |
getSubject()
get the subject of the message |
java.lang.String |
getThread()
get the current discussion thread this message is being created with. |
void |
reset()
Reset prepares the message builder class to build a new message. |
void |
setBody(java.lang.String body)
set the message body (the meat of the message) |
void |
setSubject(java.lang.String subject)
set the subject of the message |
void |
setThread(java.lang.String thread)
set the discussion thread that the message belongs to. |
Methods inherited from class org.jabber.jabberbeans.PacketBuilder |
addExtension,
delExtension,
getErrorCode,
getErrorText,
getExtensionVector,
getFromAddress,
getIdentifier,
getToAddress,
getType,
resetBase,
setErrorCode,
setErrorText,
setFromAddress,
setIdentifier,
setToAddress,
setType |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.lang.String thread
private java.lang.String subject
private java.lang.String body
Constructor Detail |
public MessageBuilder()
Method Detail |
public void reset()
public Packet build() throws java.lang.InstantiationException
public void setThread(java.lang.String thread)
thread
- a value of type 'String'public java.lang.String getThread()
public void setSubject(java.lang.String subject)
subject
- a value of type 'String'public java.lang.String getSubject()
public void setBody(java.lang.String body)
body
- a value of type 'String'public java.lang.String getBody()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |