|
|||||||||
| Home >> All >> org >> jabber >> [ jabberbeans overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.jabber.jabberbeans
Class MessageBuilder

java.lang.Objectorg.jabber.jabberbeans.PacketBuilder
org.jabber.jabberbeans.MessageBuilder
- public class MessageBuilder
- extends PacketBuilder
| Field Summary | |
private java.lang.String |
body
body of message. |
(package private) java.lang.String |
errorText
|
(package private) java.lang.String |
errorType
|
private java.util.Vector |
extensions
extensions. |
(package private) User |
fromAddress
|
(package private) java.lang.String |
identifier
|
private java.lang.String |
subject
subject line of message |
private java.lang.String |
thread
thread identifier. |
(package private) User |
toAddress
|
(package private) java.lang.String |
type
|
| Constructor Summary | |
MessageBuilder()
|
|
| Method Summary | |
void |
addExtension(Extension value)
add an extension to this message. |
Packet |
build()
Build a new Message object based on the current builder state. |
java.lang.String |
getBody()
get the message body |
java.lang.String |
getErrorText()
get the error textual description |
java.lang.String |
getErrorType()
get the error type number |
java.util.Enumeration |
getExtensionElements()
returns an enumeration of the elements currently attached to this message |
User |
getFromAddress()
get the sender address |
java.lang.String |
getIdentifier()
get the message identifier. |
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. |
User |
getToAddress()
get the current recipient |
java.lang.String |
getType()
get the message type. |
boolean |
removeExtension(Extension value)
removes the extension from the message being constructed, when passed the correct reference. |
void |
reset()
Reset prepares the message builder class to build a new message. |
protected void |
resetBase()
|
void |
setBody(java.lang.String body)
set the message body (the meat of the message) |
void |
setErrorText(java.lang.String errText)
set the error textual description |
void |
setErrorType(java.lang.String errorType)
set the error type number |
void |
setFromAddress(User from)
set the sender address |
void |
setIdentifier(java.lang.String id)
Set the message identifier. |
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. |
void |
setToAddress(User to)
set the current recipient |
void |
setType(java.lang.String type)
set the message type |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
thread
private java.lang.String thread
- thread identifier. indicates the message is still in the same 'thread',
i.e that it is the same discussion. The client returns the thread
unchanged if it is a reply to a message.
subject
private java.lang.String subject
- subject line of message
body
private java.lang.String body
- body of message.
extensions
private java.util.Vector extensions
- extensions. a vector of MessageExtension objects.
toAddress
User toAddress
fromAddress
User fromAddress
identifier
java.lang.String identifier
type
java.lang.String type
errorType
java.lang.String errorType
errorText
java.lang.String errorText
| Constructor Detail |
MessageBuilder
public MessageBuilder()
| Method Detail |
reset
public void reset()
- Reset prepares the message builder class to build a new message.
- Specified by:
resetin classPacketBuilder
build
public Packet build() throws java.lang.InstantiationException
- Build a new Message object based on the current builder state.
- Specified by:
buildin classPacketBuilder
setThread
public void setThread(java.lang.String thread)
- set the discussion thread that the message belongs to.
getThread
public java.lang.String getThread()
- get the current discussion thread this message is being created with.
setSubject
public void setSubject(java.lang.String subject)
- set the subject of the message
getSubject
public java.lang.String getSubject()
- get the subject of the message
setBody
public void setBody(java.lang.String body)
- set the message body (the meat of the message)
getBody
public java.lang.String getBody()
- get the message body
addExtension
public void addExtension(Extension value)
- add an extension to this message.
getExtensionElements
public java.util.Enumeration getExtensionElements()
- returns an enumeration of the elements currently attached to this
message
removeExtension
public boolean removeExtension(Extension value)
- removes the extension from the message being constructed, when
passed the correct reference.
resetBase
protected final void resetBase()
getToAddress
public User getToAddress()
- get the current recipient
setToAddress
public void setToAddress(User to)
- set the current recipient
getFromAddress
public User getFromAddress()
- get the sender address
setFromAddress
public void setFromAddress(User from)
- set the sender address
getIdentifier
public java.lang.String getIdentifier()
- get the message identifier. Note that a message identifier is
created on the message if one isn't passed in here - read the
built message if you would like to retrieve this (final) identifier.
setIdentifier
public void setIdentifier(java.lang.String id)
- Set the message identifier. Note that if you do not set this,
the message will generate one on creation.
getType
public java.lang.String getType()
- get the message type. Will return null for default (being type=normal)
setType
public void setType(java.lang.String type)
- set the message type
getErrorType
public java.lang.String getErrorType()
- get the error type number
setErrorType
public void setErrorType(java.lang.String errorType)
- set the error type number
getErrorText
public java.lang.String getErrorText()
- get the error textual description
setErrorText
public void setErrorText(java.lang.String errText)
- set the error textual description
|
|||||||||
| Home >> All >> org >> jabber >> [ jabberbeans overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC