Class EntityCapabilities
java.lang.Object
org.jivesoftware.openfire.entitycaps.EntityCapabilities
- All Implemented Interfaces:
Externalizable
,Serializable
,Cacheable
Contains identities and supported features describing client capabilities
for an entity.
- Author:
- Armando Jagucki
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsFeature
(String feature) Determines whether or not a given feature is included in these entity capabilities.boolean
containsIdentity
(String category, String type) Determines whether or not a given identity is included in these entity capabilities.int
Returns the approximate size of the Object in bytes.Returns the features of the entity capabilities.Returns the identities of the entity capabilities.void
void
-
Constructor Details
-
EntityCapabilities
public EntityCapabilities()
-
-
Method Details
-
getIdentities
Returns the identities of the entity capabilities.- Returns:
- all identities.
-
containsIdentity
Determines whether or not a given identity is included in these entity capabilities.- Parameters:
category
- the category of the identitytype
- the type of the identity- Returns:
- true if identity is included, false if not
-
getFeatures
Returns the features of the entity capabilities.- Returns:
- all features.
-
containsFeature
Determines whether or not a given feature is included in these entity capabilities.- Parameters:
feature
- the feature- Returns:
- true if feature is included, false if not
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
getCachedSize
Description copied from interface:Cacheable
Returns the approximate size of the Object in bytes. The size should be considered to be a best estimate of how much memory the Object occupies and may be based on empirical trials or dynamic calculations.- Specified by:
getCachedSize
in interfaceCacheable
- Returns:
- the size of the Object in bytes.
- Throws:
CannotCalculateSizeException
- if the size cannot be calculated
-