|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jabber.jabberbeans.XMLData | +--org.jabber.jabberbeans.ContentPacket | +--org.jabber.jabberbeans.Message
This is the data type that holds the data of a message. from the jabber documentation page here we get the message format (sorry, not in DTD format):
<message to="*" from="*" id="*" type="error|normal|chat|groupchat">
The following metadata
<subject>subject text</subject>
<thread>thread id</thread>
and the following content types:
<body>main text of message</body>
<ext xmlns="jabber:x:*"></ext>
</message>
Field Summary |
Fields inherited from class org.jabber.jabberbeans.ContentPacket |
error, extensions, fromAddress, identifier, toAddress, type |
Constructor Summary | |
Message(MessageBuilder builder)
Builds a message, based on the data in the MessageBuilder. |
Method Summary | |
void |
appendItem(java.lang.StringBuffer retval)
appendItem appends the XML representation of the
current packet data to the specified StringBuffer . |
java.lang.String |
getBody()
getBody returns the text within the body element, if
any |
java.lang.String |
getSubject()
getSubject returns the text within the subject element, if
any |
java.lang.String |
getThread()
getThread returns the text within the thread element, if
any |
Methods inherited from class org.jabber.jabberbeans.ContentPacket |
appendAnyError, appendBaseAttribs, Extensions, getError, getErrorCode, getErrorText, getFromAddress, getIdentifier, getToAddress, getType |
Methods inherited from class org.jabber.jabberbeans.XMLData |
appendAttrib, appendAttrib, appendChild, appendChild, escapeString, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jabber.jabberbeans.Packet |
toString |
Methods inherited from interface org.jabber.jabberbeans.Extension.Extension |
toString |
Constructor Detail |
public Message(MessageBuilder builder) throws java.lang.InstantiationException
builder
- 'MessageBuilder' to feed in.
java.lang.InstantiationException
- thrown if not enough/malformed data
was in the MessageBuilderMethod Detail |
public final java.lang.String getSubject()
getSubject
returns the text within the subject element, if
any
String
value, or null if no subjectpublic final java.lang.String getThread()
getThread
returns the text within the thread element, if
any
String
value, or null if no threadpublic final java.lang.String getBody()
getBody
returns the text within the body element, if
any
String
value, or null if no bodypublic final void appendItem(java.lang.StringBuffer retval)
appendItem
appends the XML representation of the
current packet data to the specified StringBuffer
.
appendItem
in interface Packet
appendItem
in class XMLData
retval
- The StringBuffer
to append to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |