|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.service.protocol.AbstractOperationSetContactCapabilities<T>
T - the type of the ProtocolProviderService implementation
providing the AbstractOperationSetContactCapabilities implementationpublic abstract class AbstractOperationSetContactCapabilities<T extends ProtocolProviderService>
Represents a default implementation of OperationSetContactCapabilities which attempts to make it easier for implementers to provide complete solutions while focusing on implementation-specific functionality.
| Field Summary | |
|---|---|
protected T |
parentProvider
The ProtocolProviderService which provides this OperationSetContactCapabilities. |
| Constructor Summary | |
|---|---|
protected |
AbstractOperationSetContactCapabilities(T parentProvider)
Initializes a new AbstractOperationSetContactCapabilities instance which is to be provided by a specific ProtocolProviderService implementation. |
| Method Summary | ||
|---|---|---|
void |
addContactCapabilitiesListener(ContactCapabilitiesListener listener)
Registers a specific ContactCapabilitiesListener to be notified about changes in the list of OperationSet capabilities of Contacts. |
|
protected void |
fireContactCapabilitiesEvent(Contact sourceContact,
int eventID,
Map<String,? extends OperationSet> opSets)
Fires a new ContactCapabilitiesEvent to notify the registered ContactCapabilitiesListeners that a specific Contact has changed its list of OperationSet capabilities. |
|
|
getOperationSet(Contact contact,
Class<U> opsetClass)
Gets the OperationSet corresponding to the specified Class and supported by the specified Contact. |
|
protected
|
getOperationSet(Contact contact,
Class<U> opsetClass,
boolean online)
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. |
|
protected Map<String,OperationSet> |
getSupportedOperationSets(Contact contact,
boolean online)
Gets the OperationSets supported by a specific Contact. |
|
protected boolean |
isOnline(Contact contact)
Determines whether a specific Contact is online (in contrast to offline). |
|
void |
removeContactCapabilitiesListener(ContactCapabilitiesListener listener)
Unregisters a specific ContactCapabilitiesListener to no longer be notified about changes in the list of OperationSet capabilities of Contacts. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final T extends ProtocolProviderService parentProvider
| Constructor Detail |
|---|
protected AbstractOperationSetContactCapabilities(T parentProvider)
parentProvider - the ProtocolProviderService implementation
which will provide the new instance| Method Detail |
|---|
public void addContactCapabilitiesListener(ContactCapabilitiesListener listener)
addContactCapabilitiesListener in interface OperationSetContactCapabilitieslistener - the ContactCapabilitiesListener which is to be
notified about changes in the list of OperationSet capabilities
of ContactsOperationSetContactCapabilities.addContactCapabilitiesListener(
ContactCapabilitiesListener)
protected void fireContactCapabilitiesEvent(Contact sourceContact,
int eventID,
Map<String,? extends OperationSet> opSets)
sourceContact - the Contact which is the source/cause of
the event to be firedeventID - the ID of the event to be fired which indicates the
specifics of the change of the list of OperationSet capabilities
of the specified sourceContact and the details of the eventopSets - the new set of operation sets for the given source contact
public <U extends OperationSet> U getOperationSet(Contact contact,
Class<U> opsetClass)
getSupportedOperationSets(Contact) and returns the associated
OperationSet. Since the implementation is suboptimal due to the
temporary Map allocations and loopups, extenders are advised to
override getOperationSet(Contact, Class, boolean).
getOperationSet in interface OperationSetContactCapabilitiesU - 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
capability
OperationSetContactCapabilities.getOperationSet(Contact, Class)
protected <U extends OperationSet> U getOperationSet(Contact contact,
Class<U> opsetClass,
boolean online)
getSupportedOperationSets(Contact) and returns the associated
OperationSet. Since the implementation is suboptimal due to the
temporary Map allocations and loopups, extenders are advised to
override.
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,
false
OperationSetContactCapabilities.getOperationSet(Contact, Class)public Map<String,OperationSet> getSupportedOperationSets(Contact contact)
ProtocolProviderService.getSupportedOperationSets() on
the associated ProtocolProviderService implementation. Extenders
have to override the default implementation of
getSupportedOperationSets(Contact, boolean) in order to provide
actual capability detection for the specified contact.
getSupportedOperationSets in interface OperationSetContactCapabilitiescontact - the Contact for which the supported
OperationSet capabilities are to be retrieved
OperationSetContactCapabilities.getSupportedOperationSets(Contact)
protected Map<String,OperationSet> getSupportedOperationSets(Contact contact,
boolean online)
ProtocolProviderService.getSupportedOperationSets() on
the associated ProtocolProviderService implementation. Extenders
have to override the default implementation in order to provide actual
capability detection for the specified contact.
contact - the Contact for which the supported
OperationSet capabilities are to be retrievedonline - true if contact is online; otherwise,
false
OperationSetContactCapabilities.getSupportedOperationSets(Contact)protected boolean isOnline(Contact contact)
contact - the Contact which is to be determines whether it
is online
public void removeContactCapabilitiesListener(ContactCapabilitiesListener listener)
removeContactCapabilitiesListener in interface OperationSetContactCapabilitieslistener - the ContactCapabilitiesListener which is to no
longer be notified about changes in the list of OperationSet
capabilities of ContactsOperationSetContactCapabilities.removeContactCapabilitiesListener(
ContactCapabilitiesListener)
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||