Class EntityCapabilities
- java.lang.Object
-
- org.jivesoftware.openfire.entitycaps.EntityCapabilities
-
- All Implemented Interfaces:
Externalizable,Serializable,Cacheable
public class EntityCapabilities extends Object implements Cacheable, Externalizable
Contains identities and supported features describing client capabilities for an entity.- Author:
- Armando Jagucki
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EntityCapabilities()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsFeature(String feature)Determines whether or not a given feature is included in these entity capabilities.booleancontainsIdentity(String category, String type)Determines whether or not a given identity is included in these entity capabilities.intgetCachedSize()Returns the approximate size of the Object in bytes.Set<String>getFeatures()Returns the features of the entity capabilities.Set<String>getIdentities()Returns the identities of the entity capabilities.voidreadExternal(ObjectInput in)voidwriteExternal(ObjectOutput out)
-
-
-
Method Detail
-
getIdentities
public Set<String> getIdentities()
Returns the identities of the entity capabilities.- Returns:
- all identities.
-
containsIdentity
public boolean containsIdentity(String category, String type)
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
public Set<String> getFeatures()
Returns the features of the entity capabilities.- Returns:
- all features.
-
containsFeature
public boolean containsFeature(String feature)
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
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
getCachedSize
public int getCachedSize() throws CannotCalculateSizeExceptionDescription copied from interface:CacheableReturns 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:
getCachedSizein interfaceCacheable- Returns:
- the size of the Object in bytes.
- Throws:
CannotCalculateSizeException- if the size cannot be calculated
-
-