public class ExplicitMessageEncryptionElement
extends java.lang.Object
implements org.jivesoftware.smack.packet.ExtensionElement
| Modifier and Type | Class and Description |
|---|---|
static class |
ExplicitMessageEncryptionElement.ExplicitMessageEncryptionProtocol |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ELEMENT |
static java.lang.String |
NAMESPACE |
static javax.xml.namespace.QName |
QNAME |
| Constructor and Description |
|---|
ExplicitMessageEncryptionElement(ExplicitMessageEncryptionElement.ExplicitMessageEncryptionProtocol protocol) |
ExplicitMessageEncryptionElement(java.lang.String encryptionNamespace) |
ExplicitMessageEncryptionElement(java.lang.String encryptionNamespace,
java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
static ExplicitMessageEncryptionElement |
from(org.jivesoftware.smack.packet.Message message) |
java.lang.String |
getElementName() |
java.lang.String |
getEncryptionNamespace() |
java.lang.String |
getName()
Get the optional name of the encryption method.
|
java.lang.String |
getNamespace() |
ExplicitMessageEncryptionElement.ExplicitMessageEncryptionProtocol |
getProtocol() |
static boolean |
hasProtocol(org.jivesoftware.smack.packet.MessageView message,
ExplicitMessageEncryptionElement.ExplicitMessageEncryptionProtocol protocol)
Return true, if the
message already contains an EME element with the specified protocol namespace. |
static boolean |
hasProtocol(org.jivesoftware.smack.packet.MessageView message,
java.lang.String protocolNamespace)
Return true, if the
message already contains an EME element with the specified protocolNamespace. |
static void |
set(org.jivesoftware.smack.packet.MessageBuilder message,
ExplicitMessageEncryptionElement.ExplicitMessageEncryptionProtocol protocol)
Add an EME element containing the specified
protocol namespace to the message. |
org.jivesoftware.smack.util.XmlStringBuilder |
toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static final java.lang.String ELEMENT
public static final java.lang.String NAMESPACE
public static final javax.xml.namespace.QName QNAME
public ExplicitMessageEncryptionElement(ExplicitMessageEncryptionElement.ExplicitMessageEncryptionProtocol protocol)
public ExplicitMessageEncryptionElement(java.lang.String encryptionNamespace)
public ExplicitMessageEncryptionElement(java.lang.String encryptionNamespace,
java.lang.String name)
public ExplicitMessageEncryptionElement.ExplicitMessageEncryptionProtocol getProtocol()
public java.lang.String getEncryptionNamespace()
public java.lang.String getName()
null.public java.lang.String getElementName()
getElementName in interface org.jivesoftware.smack.packet.NamedElementpublic java.lang.String getNamespace()
getNamespace in interface org.jivesoftware.smack.packet.FullyQualifiedElementpublic org.jivesoftware.smack.util.XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
toXML in interface org.jivesoftware.smack.packet.Elementpublic static ExplicitMessageEncryptionElement from(org.jivesoftware.smack.packet.Message message)
public static boolean hasProtocol(org.jivesoftware.smack.packet.MessageView message,
java.lang.String protocolNamespace)
message already contains an EME element with the specified protocolNamespace.message - messageprotocolNamespace - namespacepublic static boolean hasProtocol(org.jivesoftware.smack.packet.MessageView message,
ExplicitMessageEncryptionElement.ExplicitMessageEncryptionProtocol protocol)
message already contains an EME element with the specified protocol namespace.message - messageprotocol - protocolpublic static void set(org.jivesoftware.smack.packet.MessageBuilder message,
ExplicitMessageEncryptionElement.ExplicitMessageEncryptionProtocol protocol)
protocol namespace to the message.
In case there is already an element with that protocol, we do nothing.message - a message builder.protocol - encryption protocol