|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.echomine.jabber.JabberMessage
com.echomine.jabber.JabberJDOMMessage
com.echomine.jabber.AbstractJabberMessage
public abstract class AbstractJabberMessage
This message adds some base functionality for those that uses it. It adds parsing of error messages, parsing of to, from, and type. The default for the message is not to look for reply and not sent synchronously.
Field Summary | |
---|---|
static java.lang.String |
TYPE_ERROR
|
Fields inherited from class com.echomine.jabber.JabberMessage |
---|
messageID |
Constructor Summary | |
---|---|
protected |
AbstractJabberMessage()
|
|
AbstractJabberMessage(java.lang.String type,
Element root)
this constructor is for creating outgoing messages. |
Method Summary | |
---|---|
ErrorMessage |
getErrorMessage()
retrieves the error message if this message is an error type. |
JID |
getFrom()
|
JID |
getTo()
|
java.lang.String |
getType()
|
boolean |
isError()
check to see if this is an error message. |
JabberMessage |
parse(JabberMessageParser parser,
Element msgTree)
parses the message. |
void |
setErrorMessage(ErrorMessage msg)
sets the error message. |
void |
setFrom(JID from)
sets the originator of the message. |
void |
setTo(JID to)
sets the recipient of the message |
void |
setType(java.lang.String type)
sets the type for the message. |
Methods inherited from class com.echomine.jabber.JabberJDOMMessage |
---|
encode, getDOM, getMessageType, getXMLOutputter, setMessageID, toString |
Methods inherited from class com.echomine.jabber.JabberMessage |
---|
getMessageID, getReplyMessage, getTimeout, getXMessage, getXMessages, interrupt, isReplyRequired, isSendXMessages, isSynchronized, replyReceived, setReplyRequired, setSendXMessages, setSynchronized, setTimeout, setXMessage, setXMessages |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TYPE_ERROR
Constructor Detail |
---|
public AbstractJabberMessage(java.lang.String type, Element root)
protected AbstractJabberMessage()
Method Detail |
---|
public JabberMessage parse(JabberMessageParser parser, Element msgTree) throws ParseException
parse
in interface JabberMessageParsable
parse
in class JabberJDOMMessage
ParseException
public java.lang.String getType()
public void setType(java.lang.String type)
public JID getTo()
public void setTo(JID to)
public JID getFrom()
public void setFrom(JID from)
from
- the originator of the messagepublic boolean isError()
public ErrorMessage getErrorMessage()
public void setErrorMessage(ErrorMessage msg)
msg
- the error message associated with this message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |