public class JivePropertiesExtension
extends java.lang.Object
implements org.jivesoftware.smack.packet.ExtensionElement
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ELEMENT |
static java.lang.String |
NAMESPACE
Namespace used to store stanza properties.
|
Constructor and Description |
---|
JivePropertiesExtension() |
JivePropertiesExtension(java.util.Map<java.lang.String,java.lang.Object> properties) |
Modifier and Type | Method and Description |
---|---|
void |
deleteProperty(java.lang.String name)
Deletes a property.
|
static JivePropertiesExtension |
from(org.jivesoftware.smack.packet.Message message)
Return a Jive properties extensions of the given message.
|
java.lang.String |
getElementName() |
java.lang.String |
getNamespace() |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Returns an unmodifiable map of all properties.
|
java.lang.Object |
getProperty(java.lang.String name)
Returns the stanza property with the specified name or
null if the
property doesn't exist. |
java.util.Collection<java.lang.String> |
getPropertyNames()
Returns an unmodifiable collection of all the property names that are set.
|
void |
setProperty(java.lang.String name,
java.lang.Object value)
Sets a property with an Object as the value.
|
java.lang.CharSequence |
toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final java.lang.String NAMESPACE
public static final java.lang.String ELEMENT
public JivePropertiesExtension()
public JivePropertiesExtension(java.util.Map<java.lang.String,java.lang.Object> properties)
public java.lang.Object getProperty(java.lang.String name)
null
if the
property doesn't exist. Property values that were originally primitives will
be returned as their object equivalent. For example, an int property will be
returned as an Integer, a double as a Double, etc.name
- the name of the property.null
if the property doesn't exist.public void setProperty(java.lang.String name, java.lang.Object value)
name
- the name of the property.value
- the value of the property.public void deleteProperty(java.lang.String name)
name
- the name of the property to delete.public java.util.Collection<java.lang.String> getPropertyNames()
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
public java.lang.String getElementName()
getElementName
in interface org.jivesoftware.smack.packet.NamedElement
public java.lang.String getNamespace()
getNamespace
in interface org.jivesoftware.smack.packet.FullyQualifiedElement
public java.lang.CharSequence toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
toXML
in interface org.jivesoftware.smack.packet.Element
public static JivePropertiesExtension from(org.jivesoftware.smack.packet.Message message)
message
- the message to return the extension from.