|
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.AbstractProtocolProviderService
public abstract class AbstractProtocolProviderService
Implements standard functionality of ProtocolProviderService in order to make it easier for implementers to provide complete solutions while focusing on protocol-specific details.
| Field Summary |
|---|
| Fields inherited from interface net.java.sip.communicator.service.protocol.ProtocolProviderService |
|---|
BIND_RETRIES_DEFAULT_VALUE, BIND_RETRIES_PROPERTY_NAME |
| Constructor Summary | |
|---|---|
AbstractProtocolProviderService()
|
|
| Method Summary | ||
|---|---|---|
void |
addRegistrationStateChangeListener(RegistrationStateChangeListener listener)
Registers the specified listener with this provider so that it would receive notifications on changes of its state or other properties such as its local address and display name. |
|
protected
|
addSupportedOperationSet(Class<T> opsetClass,
T opset)
Adds a specific OperationSet implementation to the set of supported OperationSets of this instance. |
|
void |
clearRegistrationStateChangeListener()
Clear all registration state change listeners. |
|
void |
fireRegistrationStateChanged(RegistrationState oldState,
RegistrationState newState,
int reasonCode,
String reason)
Creates a RegistrationStateChange event corresponding to the specified old and new states and notifies all currently registered listeners. |
|
|
getOperationSet(Class<T> opsetClass)
Returns the operation set corresponding to the specified class or null if this operation set is not supported by the provider implementation. |
|
String |
getProtocolDisplayName()
Returns the protocol display name. |
|
Map<String,OperationSet> |
getSupportedOperationSets()
Returns an array containing all operation sets supported by the current implementation. |
|
boolean |
isRegistered()
Indicates whether or not this provider is registered |
|
void |
removeRegistrationStateChangeListener(RegistrationStateChangeListener listener)
Removes the specified registration state change listener so that it does not receive any further notifications upon changes of the RegistrationState of this provider. |
|
protected
|
removeSupportedOperationSet(Class<T> opsetClass)
Removes an OperationSet implementation from the set of supported OperationSets for this instance. |
|
String |
toString()
A clear display for ProtocolProvider when its printed in logs. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.java.sip.communicator.service.protocol.ProtocolProviderService |
|---|
getAccountID, getProtocolIcon, getProtocolName, getRegistrationState, hashCode, isSignalingTransportSecure, register, shutdown, unregister |
| Constructor Detail |
|---|
public AbstractProtocolProviderService()
| Method Detail |
|---|
public void addRegistrationStateChangeListener(RegistrationStateChangeListener listener)
addRegistrationStateChangeListener in interface ProtocolProviderServicelistener - the listener to register.
protected <T extends OperationSet> void addSupportedOperationSet(Class<T> opsetClass,
T opset)
supportedOperationSets which works with class
names instead of Class and also shortens the code which performs
such additions.
T - the exact type of the OperationSet implementation to
be addedopsetClass - the Class of OperationSet under the
name of which the specified implementation is to be addedopset - the OperationSet implementation to be addedprotected <T extends OperationSet> void removeSupportedOperationSet(Class<T> opsetClass)
T - the exact type of the OperationSet implementation to
be addedopsetClass - the Class of OperationSet under the
name of which the specified implementation is to be added
public void fireRegistrationStateChanged(RegistrationState oldState,
RegistrationState newState,
int reasonCode,
String reason)
oldState - the state that the provider had before the change
occurrednewState - the state that the provider is currently in.reasonCode - a value corresponding to one of the REASON_XXX fields
of the RegistrationStateChangeEvent class, indicating the reason for
this state transition.reason - a String further explaining the reason code or null if
no such explanation is necessary.public <T extends OperationSet> T getOperationSet(Class<T> opsetClass)
getOperationSet in interface ProtocolProviderServiceT - the exact type of the OperationSet that we're looking
foropsetClass - the Class of the operation set that we're
looking for.
public String getProtocolDisplayName()
getProtocolDisplayName in interface ProtocolProviderServicepublic Map<String,OperationSet> getSupportedOperationSets()
getSupportedOperationSets in interface ProtocolProviderServicepublic boolean isRegistered()
isRegistered in interface ProtocolProviderServicepublic void removeRegistrationStateChangeListener(RegistrationStateChangeListener listener)
removeRegistrationStateChangeListener in interface ProtocolProviderServicelistener - the listener to register for
RegistrationStateChangeEvents.public void clearRegistrationStateChangeListener()
public String toString()
toString in class Object
|
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 | |||||||||