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.
|
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 JID getFrom() throws XMLException
XMLExceptionpublic String getId() throws XMLException
XMLExceptionpublic JID getTo() throws XMLException
XMLExceptionpublic StanzaType getType() throws XMLException
null if type not present.XMLExceptionpublic StanzaType getType(StanzaType defaultValue) throws XMLException
defaultValue - default value. Will be returned if type of stanza id
null.defaultValue if type not
present.XMLExceptionpublic void setFrom(JID jid) throws XMLException
jid - JIDXMLExceptionpublic void setId(String id) throws XMLException
id - idXMLExceptionpublic void setTo(JID jid) throws XMLException
jid - JIDXMLExceptionpublic void setType(StanzaType type) throws XMLException
type - StanzaTypeXMLExceptionCopyright © 2006–2016 Tigase. All rights reserved.