Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol
Interface OperationSetContactCapabilities

All Superinterfaces:
OperationSet
All Known Implementing Classes:
AbstractOperationSetContactCapabilities, OperationSetContactCapabilitiesJabberImpl

public interface OperationSetContactCapabilities
extends OperationSet

Represents an OperationSet to query the OperationSets supported for a specific Contact. The OperationSets reported as supported for a specific Contact are considered by the associated protocol provider to be capabilities possessed by the Contact in question.

Author:
Lubomir Marinov

Method Summary
 void addContactCapabilitiesListener(ContactCapabilitiesListener listener)
          Registers a specific ContactCapabilitiesListener to be notified about changes in the list of OperationSet capabilities of Contacts.
<T extends OperationSet>
T
getOperationSet(Contact contact, Class<T> opsetClass)
          Gets the OperationSet corresponding to the specified Class and supported by the specified Contact.
 Map<String,OperationSet> getSupportedOperationSets(Contact contact)
          Gets the OperationSets supported by a specific Contact.
 void removeContactCapabilitiesListener(ContactCapabilitiesListener listener)
          Unregisters a specific ContactCapabilitiesListener to no longer be notified about changes in the list of OperationSet capabilities of Contacts.
 

Method Detail

addContactCapabilitiesListener

void addContactCapabilitiesListener(ContactCapabilitiesListener listener)
Registers a specific ContactCapabilitiesListener to be notified about changes in the list of OperationSet capabilities of Contacts. If the specified listener has already been registered, adding it again has no effect.

Parameters:
listener - the ContactCapabilitiesListener which is to be notified about changes in the list of OperationSet capabilities of Contacts

getOperationSet

<T extends OperationSet> T getOperationSet(Contact contact,
                                           Class<T> opsetClass)
Gets the OperationSet corresponding to the specified Class and supported by the specified Contact. If the returned value is non-null, it indicates that the Contact is considered by the associated protocol provider to possess the opsetClass capability. Otherwise, the associated protocol provider considers contact to not have the opsetClass capability.

Type Parameters:
T - the type extending OperationSet for which the specified contact is to be checked whether it possesses it as a capability
Parameters:
contact - the Contact for which the opsetClass capability is to be queried
opsetClass - the OperationSet Class for which the specified contact is to be checked whether it possesses it as a capability
Returns:
the OperationSet corresponding to the specified opsetClass which is considered by the associated protocol provider to be possessed as a capability by the specified contact; otherwise, null

getSupportedOperationSets

Map<String,OperationSet> getSupportedOperationSets(Contact contact)
Gets the OperationSets supported by a specific Contact. The returned OperationSets are considered by the associated protocol provider to capabilities possessed by the specified contact.

Parameters:
contact - the Contact for which the supported OperationSet capabilities are to be retrieved
Returns:
a Map listing the OperationSets considered by the associated protocol provider to be supported by the specified contact (i.e. to be possessed as capabilities). Each supported OperationSet capability is represented by a Map.Entry with key equal to the OperationSet class name and value equal to the respective OperationSet instance

removeContactCapabilitiesListener

void removeContactCapabilitiesListener(ContactCapabilitiesListener listener)
Unregisters a specific ContactCapabilitiesListener to no longer be notified about changes in the list of OperationSet capabilities of Contacts. If the specified listener has already been unregistered or has never been registered, removing it has no effect.

Parameters:
listener - the ContactCapabilitiesListener which is to no longer be notified about changes in the list of OperationSet capabilities of Contacts

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.