public class OperationSetContactCapabilitiesJabberImpl extends AbstractOperationSetContactCapabilities<ProtocolProviderServiceJabberImpl> implements UserCapsNodeListener, ContactPresenceStatusListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_XMPP_USE_ALL_RESOURCES_FOR_CAPABILITIES
The name of the property used to control whether to use
all resources to show capabilities
|
static boolean |
USE_ALL_RESOURCES_FOR_CAPABILITIES_DEFAULT
The default value for the capabilities setting
|
parentProvider
Constructor and Description |
---|
OperationSetContactCapabilitiesJabberImpl(ProtocolProviderServiceJabberImpl parentProvider)
Initializes a new OperationSetContactCapabilitiesJabberImpl
instance which is to be provided by a specific
ProtocolProviderServiceJabberImpl.
|
Modifier and Type | Method and Description |
---|---|
void |
contactPresenceStatusChanged(ContactPresenceStatusChangeEvent evt)
Removes the capabilities when the user goes offline.
|
void |
fireContactCapabilitiesChanged(java.lang.String user,
java.util.ArrayList<java.lang.String> fullJids)
Fires event that contact capabilities has changed.
|
protected java.util.Map<java.lang.String,OperationSet> |
getLargestSupportedOperationSet(java.util.ArrayList<java.lang.String> fullJids)
Gets the largest set of OperationSets supported from a
list of full JIDs.
|
protected <U extends OperationSet> |
getOperationSet(Contact contact,
java.lang.Class<U> opsetClass,
boolean online)
Gets the OperationSet corresponding to the specified
Class and supported by the specified Contact.
|
protected java.util.Map<java.lang.String,OperationSet> |
getSupportedOperationSets(Contact contact,
boolean online)
Gets the OperationSets supported by a specific Contact.
|
(package private) void |
setDiscoveryManager(ScServiceDiscoveryManager discoveryManager)
Sets the ScServiceDiscoveryManager which is the
discoveryManager of
AbstractOperationSetContactCapabilities.parentProvider . |
void |
userCapsNodeAdded(java.lang.String user,
java.util.ArrayList<java.lang.String> fullJids,
java.lang.String node,
boolean online)
Notifies this listener that an EntityCapsManager has added a
record for a specific user about the caps node the user has.
|
void |
userCapsNodeChanged(java.lang.String user,
java.util.ArrayList<java.lang.String> fullJids,
java.lang.String node,
boolean online)
Notifies this listener that an EntityCapsManager has changed a
record for a specific user about the caps node the user has.
|
void |
userCapsNodeRemoved(java.lang.String user,
java.util.ArrayList<java.lang.String> fullJids,
java.lang.String node,
boolean online)
Notifies this listener that an EntityCapsManager has removed a
record for a specific user about the caps node the user has.
|
addContactCapabilitiesListener, fireContactCapabilitiesEvent, getOperationSet, getSupportedOperationSets, isOnline, removeContactCapabilitiesListener
public static final java.lang.String PROP_XMPP_USE_ALL_RESOURCES_FOR_CAPABILITIES
public static final boolean USE_ALL_RESOURCES_FOR_CAPABILITIES_DEFAULT
public OperationSetContactCapabilitiesJabberImpl(ProtocolProviderServiceJabberImpl parentProvider)
parentProvider
- the ProtocolProviderServiceJabberImpl
which will provide the new instanceprotected <U extends OperationSet> U getOperationSet(Contact contact, java.lang.Class<U> opsetClass, boolean online)
getOperationSet
in class AbstractOperationSetContactCapabilities<ProtocolProviderServiceJabberImpl>
U
- the type extending OperationSet for which the
specified contact is to be checked whether it possesses it as a
capabilitycontact
- the Contact for which the opsetClass
capability is to be queriedopsetClass
- the OperationSet Class for which the
specified contact is to be checked whether it possesses it as a
capabilityonline
- true if contact is online; otherwise,
falseAbstractOperationSetContactCapabilities.getOperationSet(Contact,
Class)
protected java.util.Map<java.lang.String,OperationSet> getSupportedOperationSets(Contact contact, boolean online)
getSupportedOperationSets
in class AbstractOperationSetContactCapabilities<ProtocolProviderServiceJabberImpl>
contact
- the Contact for which the supported
OperationSet capabilities are to be retrievedonline
- true if contact is online; otherwise,
falseAbstractOperationSetContactCapabilities.getSupportedOperationSets(
Contact)
protected java.util.Map<java.lang.String,OperationSet> getLargestSupportedOperationSet(java.util.ArrayList<java.lang.String> fullJids)
fullJids
- a list of full JIDs in which to find the resource with
the most capabilities.void setDiscoveryManager(ScServiceDiscoveryManager discoveryManager)
AbstractOperationSetContactCapabilities.parentProvider
.discoveryManager
- the ScServiceDiscoveryManager which is
the discoveryManager of AbstractOperationSetContactCapabilities.parentProvider
public void userCapsNodeAdded(java.lang.String user, java.util.ArrayList<java.lang.String> fullJids, java.lang.String node, boolean online)
userCapsNodeAdded
in interface UserCapsNodeListener
user
- the user (full JID)fullJids
- a list of all resources of the user (full JIDs)node
- the entity caps node#veronline
- indicates if the user is currently onlineUserCapsNodeListener#userCapsNodeAdded(String, String, boolean)
public void userCapsNodeRemoved(java.lang.String user, java.util.ArrayList<java.lang.String> fullJids, java.lang.String node, boolean online)
userCapsNodeRemoved
in interface UserCapsNodeListener
user
- the user (full JID)fullJids
- a list of all resources of the user (full JIDs)node
- the entity caps node#veronline
- indicates if the user is currently onlineUserCapsNodeListener#userCapsNodeAdded(String, String, boolean)
public void userCapsNodeChanged(java.lang.String user, java.util.ArrayList<java.lang.String> fullJids, java.lang.String node, boolean online)
user
- the user (full JID)fullJids
- a list of all resources of the user (full JIDs)node
- the entity caps node#veronline
- indicates if the given user is onlinepublic void contactPresenceStatusChanged(ContactPresenceStatusChangeEvent evt)
contactPresenceStatusChanged
in interface ContactPresenceStatusListener
evt
- the ContactPresenceStatusChangeEvent that notified
uspublic void fireContactCapabilitiesChanged(java.lang.String user, java.util.ArrayList<java.lang.String> fullJids)
user
- the user to search for its contact.fullJids
- a list of all resources of the user (full JIDs)
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.