Class EntityCapabilities2
- java.lang.Object
-
- rocks.xmpp.core.stream.model.StreamFeature
-
- rocks.xmpp.extensions.caps2.model.EntityCapabilities2
-
- All Implemented Interfaces:
Comparable<StreamFeature>
,EntityCapabilities
public final class EntityCapabilities2 extends StreamFeature implements EntityCapabilities
The implementation of the<c/>
element in theurn:xmpp:caps
namespace.This class is immutable.
- See Also:
- XEP-0390: Entity Capabilities 2.0
-
-
Constructor Summary
Constructors Constructor Description EntityCapabilities2(DiscoverableInfo discoverableInfo, MessageDigest... messageDigest)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
createCapabilityHashNode(Hashed hashed)
Creates the Capability Hash Node.byte[]
createVerificationString(DiscoverableInfo discoverableInfo)
Creates an UTF-8 encoded verification string from a disco#info query.Set<Hashed>
getCapabilityHashSet()
Gets the capability hash set.String
toString()
-
Methods inherited from class rocks.xmpp.core.stream.model.StreamFeature
compareTo, getPriority, isMandatory, requiresRestart
-
-
-
-
Field Detail
-
NAMESPACE
public static final String NAMESPACE
"urn:xmpp:caps"- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EntityCapabilities2
public EntityCapabilities2(DiscoverableInfo discoverableInfo, MessageDigest... messageDigest)
-
-
Method Detail
-
getCapabilityHashSet
public final Set<Hashed> getCapabilityHashSet()
Description copied from interface:EntityCapabilities
Gets the capability hash set.- Specified by:
getCapabilityHashSet
in interfaceEntityCapabilities
- Returns:
- The capability hash set.
-
createVerificationString
public final byte[] createVerificationString(DiscoverableInfo discoverableInfo)
Description copied from interface:EntityCapabilities
Creates an UTF-8 encoded verification string from a disco#info query.The returned byte array is neither hashed nor base64 encoded. It should be used as input for generating the capability hash set.
- Specified by:
createVerificationString
in interfaceEntityCapabilities
- Parameters:
discoverableInfo
- The query.- Returns:
- The caps string, aka. verification string.
-
createCapabilityHashNode
public final String createCapabilityHashNode(Hashed hashed)
Description copied from interface:EntityCapabilities
Creates the Capability Hash Node.This node is used to query the generating entity via a Service Discovery Info query (disco#info).
- Specified by:
createCapabilityHashNode
in interfaceEntityCapabilities
- Parameters:
hashed
- The pair of hash algorithm and value.- Returns:
- The node.
-
-