public abstract class Stanza extends StreamPacket
| Modifier and Type | Class and Description |
|---|---|
static class |
Stanza.UnkownStanzaTypeException |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canBeConverted(Element element) |
static Stanza |
create(Element element)
Creates new stanza.
|
static IQ |
createIQ() |
static Message |
createMessage() |
static Presence |
createPresence() |
XMPPException.ErrorCondition |
getErrorCondition()
Returns XMPPException.ErrorCondition element.
|
String |
getErrorMessage() |
JID |
getFrom()
Returns 'from' attribute.
|
String |
getId()
Returns id of stanza.
|
JID |
getTo()
Returns 'to' attribute.
|
StanzaType |
getType()
Returns type of stanza.
|
StanzaType |
getType(StanzaType defaultValue)
Returns type of stanza.
|
void |
setFrom(JID jid)
Sets 'from' attribute.
|
void |
setId(String id)
Sets id of stanza
|
void |
setTo(JID jid)
Sets 'to' attribute.
|
void |
setType(StanzaType type)
Sets type of stanza.
|
getXmppStream, setXmppStreamaddChild, equals, findChild, getAsString, getAttribute, getAttributes, getChildAfter, getChildElementValue, getChildElementValue, getChildren, getChildren, getChildrenNS, getChildrenNS, getFirstChild, getFirstChild, getName, getNextSibling, getParent, getValue, getWrappedElement, getXMLNS, hashCode, removeAttribute, removeChild, setAttribute, setAttributes, setChildElementValue, setChildElementValue, setParent, setValue, setXMLNSpublic static boolean canBeConverted(Element element) throws XMLException
XMLExceptionpublic static final Stanza create(Element element) throws JaxmppException
element - element containing stanza.JaxmppExceptionpublic static final IQ createIQ() throws JaxmppException
JaxmppExceptionpublic static final Message createMessage() throws JaxmppException
JaxmppExceptionpublic static final Presence createPresence() throws JaxmppException
JaxmppExceptionpublic XMPPException.ErrorCondition getErrorCondition() throws XMLException
null is element not present.XMLExceptionpublic String getErrorMessage() throws XMLException
XMLExceptionpublic JID getFrom() throws XMLException
XMLExceptionpublic void setFrom(JID jid) throws XMLException
jid - JIDXMLExceptionpublic String getId() throws XMLException
XMLExceptionpublic void setId(String id) throws XMLException
id - idXMLExceptionpublic JID getTo() throws XMLException
XMLExceptionpublic void setTo(JID jid) throws XMLException
jid - JIDXMLExceptionpublic StanzaType getType() throws XMLException
null if type not present.XMLExceptionpublic void setType(StanzaType type) throws XMLException
type - StanzaTypeXMLExceptionpublic StanzaType getType(StanzaType defaultValue) throws XMLException
defaultValue - default value. Will be returned if type of stanza id null.defaultValue if type not present.XMLExceptionCopyright © 2006–2018 Tigase. All rights reserved.