Class OmemoElement
- java.lang.Object
-
- org.jivesoftware.smackx.omemo.element.OmemoElement
-
- All Implemented Interfaces:
Element
,ExtensionElement
,FullyQualifiedElement
,NamedElement
,XmlLangElement
- Direct Known Subclasses:
OmemoElement_VAxolotl
public abstract class OmemoElement extends Object implements ExtensionElement
Class that represents an OmemoElement.
-
-
Field Summary
Fields Modifier and Type Field Description static String
ATTR_PAYLOAD
static String
NAME_ENCRYPTED
static int
TYPE_OMEMO_MESSAGE
static int
TYPE_OMEMO_PREKEY_MESSAGE
-
Constructor Summary
Constructors Constructor Description OmemoElement(OmemoHeaderElement header, byte[] payload)
Create a new OmemoMessageElement from a header and a payload.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getElementName()
Returns the root element name.OmemoHeaderElement
getHeader()
byte[]
getPayload()
Return the payload of the message.boolean
isKeyTransportElement()
boolean
isMessageElement()
XmlStringBuilder
toXML(XmlEnvironment enclosingNamespace)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smack.packet.FullyQualifiedElement
getLanguage, getNamespace, getQName
-
-
-
-
Field Detail
-
TYPE_OMEMO_PREKEY_MESSAGE
public static final int TYPE_OMEMO_PREKEY_MESSAGE
- See Also:
- Constant Field Values
-
TYPE_OMEMO_MESSAGE
public static final int TYPE_OMEMO_MESSAGE
- See Also:
- Constant Field Values
-
NAME_ENCRYPTED
public static final String NAME_ENCRYPTED
- See Also:
- Constant Field Values
-
ATTR_PAYLOAD
public static final String ATTR_PAYLOAD
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OmemoElement
public OmemoElement(OmemoHeaderElement header, byte[] payload)
Create a new OmemoMessageElement from a header and a payload.- Parameters:
header
- header of the messagepayload
- payload
-
-
Method Detail
-
getHeader
public OmemoHeaderElement getHeader()
-
getPayload
public byte[] getPayload()
Return the payload of the message.- Returns:
- encrypted payload of the message.
-
isKeyTransportElement
public boolean isKeyTransportElement()
-
isMessageElement
public boolean isMessageElement()
-
toXML
public XmlStringBuilder toXML(XmlEnvironment enclosingNamespace)
-
getElementName
public String getElementName()
Description copied from interface:NamedElement
Returns the root element name.- Specified by:
getElementName
in interfaceNamedElement
- Returns:
- the element name.
-
-