public class CapsPacketExtension
extends java.lang.Object
implements org.jivesoftware.smack.packet.PacketExtension
PacketExtension
implementation for Entity Capabilities packets.
This work is based on Jonas Adahl's smack fork.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ELEMENT_NAME
The name of the "content" element.
|
static java.lang.String |
HASH_METHOD
The hash method we use for generating the ver string.
|
static java.lang.String |
NAMESPACE
The name space that the Entity Capabilities elements belong to.
|
Constructor and Description |
---|
CapsPacketExtension()
An empty constructor for the CapsPacketExtension.
|
CapsPacketExtension(java.lang.String ext,
java.lang.String node,
java.lang.String hash,
java.lang.String ver)
Creates a new CapsPacketExtension using the specified
parameters.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getElementName()
Returns the name of the caps element.
|
java.lang.String |
getExtensions()
Returns the value of the ext parameter as a string set of
name tokens specifying additional feature bundles.
|
java.lang.String |
getHash()
Returns the value of the hash parameter indicating the hashing
algorithm used to generate the verification string.
|
java.lang.String |
getNamespace()
Returns the Entity Capabilities namespace.
|
java.lang.String |
getNode()
Returns the node URI.
|
java.lang.String |
getVersion()
Returns the version associated with this packet.
|
void |
setExtensions(java.lang.String extensions)
Sets the value of the ext parameter as a string set of
name tokens specifying additional feature bundles.
|
void |
setHash(java.lang.String hash)
Sets the value of the hash parameter indicating the hashing
algorithm used to generate the verification string.
|
void |
setNode(java.lang.String node)
Specifies the value of the node URI.
|
void |
setVersion(java.lang.String version)
Sets the value of the ver parameter.
|
java.lang.String |
toXML()
Returns the XML representation of the caps packet extension.
|
public static final java.lang.String HASH_METHOD
public static final java.lang.String NAMESPACE
public static final java.lang.String ELEMENT_NAME
public CapsPacketExtension()
public CapsPacketExtension(java.lang.String ext, java.lang.String node, java.lang.String hash, java.lang.String ver)
ext
- a set of name tokens specifying additional info, that is
deprecated and that we keep for backward compatibility.node
- a URI that uniquely identifies a software applicationver
- a version String.representing the identity of the supported
features.hash
- The hashing algorithm used to generate the verification
String.public java.lang.String getElementName()
getElementName
in interface org.jivesoftware.smack.packet.PacketExtension
public java.lang.String getNamespace()
getNamespace
in interface org.jivesoftware.smack.packet.PacketExtension
public java.lang.String getNode()
public void setNode(java.lang.String node)
node
- a URI uniquely identifying the application.public java.lang.String getVersion()
public void setVersion(java.lang.String version)
version
- the value of the ver parameter.public java.lang.String getHash()
public void setHash(java.lang.String hash)
hash
- the hashing algorithm used to generate the verification
string.public java.lang.String getExtensions()
public void setExtensions(java.lang.String extensions)
extensions
- the value of the ext parameter.public java.lang.String toXML()
toXML
in interface org.jivesoftware.smack.packet.PacketExtension
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.