public class OperationSetServerStoredAccountInfoSipImpl extends AbstractOperationSetServerStoredAccountInfo implements RegistrationStateChangeListener
Constructor and Description |
---|
OperationSetServerStoredAccountInfoSipImpl(ProtocolProviderServiceSipImpl provider)
Creates this op.set.
|
Modifier and Type | Method and Description |
---|---|
void |
addDetail(ServerStoredDetails.GenericDetail detail)
Adds the specified detail to the list of details registered on-line
for this account.
|
void |
addDetail(ServerStoredDetails.GenericDetail detail,
boolean fireChangeEvents)
Adds the specified detail to the list of details registered on-line
for this account.
|
java.util.Iterator<ServerStoredDetails.GenericDetail> |
getAllAvailableDetails()
Returns all details currently available and set for our account.
|
java.util.Iterator<ServerStoredDetails.GenericDetail> |
getDetails(java.lang.Class<? extends ServerStoredDetails.GenericDetail> detailClass)
Returns an iterator over all details that are instances of exactly the
same class as the one specified.
|
<T extends ServerStoredDetails.GenericDetail> |
getDetailsAndDescendants(java.lang.Class<T> detailClass)
Returns an iterator over all details of the specified class.
|
int |
getMaxDetailInstances(java.lang.Class<? extends ServerStoredDetails.GenericDetail> detailClass)
The method returns the number of instances supported for a particular
detail type.
|
java.util.Iterator<java.lang.Class<? extends ServerStoredDetails.GenericDetail>> |
getSupportedDetailTypes()
Returns all detail Class-es that the underlying implementation supports
setting.
|
boolean |
isDetailClassEditable(java.lang.Class<? extends ServerStoredDetails.GenericDetail> detailClass)
Determines whether the underlying implementation supports the edition
of this detail class.
|
boolean |
isDetailClassSupported(java.lang.Class<? extends ServerStoredDetails.GenericDetail> detailClass)
Determines whether a detail class represents a detail supported by the
underlying implementation or not.
|
void |
registrationStateChanged(RegistrationStateChangeEvent evt)
Lister method for protocol provider registration event.
|
boolean |
removeDetail(ServerStoredDetails.GenericDetail detail)
Removes the specified detail from the list of details stored online for
this account.
|
boolean |
replaceDetail(ServerStoredDetails.GenericDetail currentDetailValue,
ServerStoredDetails.GenericDetail newDetailValue)
Replaces the currentDetailValue detail with newDetailValue and returns
true if the operation was a success or false if currentDetailValue did
not previously exist (in this case an additional call to addDetail is
required).
|
void |
save()
Saves the list of details for this account that were ready to be stored
online on the server.
|
(package private) void |
setOurDisplayName(java.lang.String newDisplayName)
Changes the display name string.
|
(package private) void |
shutdown()
Frees allocated resources.
|
addServerStoredDetailsChangeListener, fireServerStoredDetailsChangeEvent, removeServerStoredDetailsChangeListener
public OperationSetServerStoredAccountInfoSipImpl(ProtocolProviderServiceSipImpl provider)
provider
- the parent provider.public <T extends ServerStoredDetails.GenericDetail> java.util.Iterator<T> getDetailsAndDescendants(java.lang.Class<T> detailClass)
getDetailsAndDescendants
in interface OperationSetServerStoredAccountInfo
detailClass
- one of the detail classes defined in the
ServerStoredDetails class, indicating the kind of
details we're interested in.public java.util.Iterator<ServerStoredDetails.GenericDetail> getDetails(java.lang.Class<? extends ServerStoredDetails.GenericDetail> detailClass)
getDetails
in interface OperationSetServerStoredAccountInfo
detailClass
- one of the detail classes defined in the
ServerStoredDetails class, indicating the kind of
details we're interested in.public java.util.Iterator<ServerStoredDetails.GenericDetail> getAllAvailableDetails()
getAllAvailableDetails
in interface OperationSetServerStoredAccountInfo
public java.util.Iterator<java.lang.Class<? extends ServerStoredDetails.GenericDetail>> getSupportedDetailTypes()
getSupportedDetailTypes
in interface OperationSetServerStoredAccountInfo
public boolean isDetailClassSupported(java.lang.Class<? extends ServerStoredDetails.GenericDetail> detailClass)
isDetailClassSupported
in interface OperationSetServerStoredAccountInfo
detailClass
- the class the support for which we'd like to
determine.public boolean isDetailClassEditable(java.lang.Class<? extends ServerStoredDetails.GenericDetail> detailClass)
isDetailClassEditable
in interface OperationSetServerStoredAccountInfo
detailClass
- the class whose edition we'd like to determine if it's
possiblepublic int getMaxDetailInstances(java.lang.Class<? extends ServerStoredDetails.GenericDetail> detailClass)
getMaxDetailInstances
in interface OperationSetServerStoredAccountInfo
detailClass
- GenericDetail subclasspublic void addDetail(ServerStoredDetails.GenericDetail detail) throws java.lang.IllegalArgumentException, OperationFailedException, java.lang.ArrayIndexOutOfBoundsException
addDetail
in interface OperationSetServerStoredAccountInfo
detail
- the detail that we'd like registered on the server.java.lang.IllegalArgumentException
- if such a detail already exists
and its max instances number has
been atteined or if the underlying
implementation does not support
setting details of the
corresponding class.OperationFailedException
- with code Network Failure if
putting the new value online has
failed.java.lang.ArrayIndexOutOfBoundsException
- if the number of instances
currently registered by the
application is already equal to
the maximum number of supported
instances.public void addDetail(ServerStoredDetails.GenericDetail detail, boolean fireChangeEvents) throws java.lang.IllegalArgumentException, OperationFailedException, java.lang.ArrayIndexOutOfBoundsException
detail
- the detail that we'd like registered on the server.fireChangeEvents
- whether to fire change events.java.lang.IllegalArgumentException
- if such a detail already exists
and its max instances number has
been atteined or if the underlying
implementation does not support
setting details of the
corresponding class.OperationFailedException
- with code Network Failure if
putting the new value online has
failed.java.lang.ArrayIndexOutOfBoundsException
- if the number of instances
currently registered by the
application is already equal to
the maximum number of supported
instances.public boolean removeDetail(ServerStoredDetails.GenericDetail detail) throws OperationFailedException
removeDetail
in interface OperationSetServerStoredAccountInfo
detail
- the detail to removeOperationFailedException
- with code Network Failure if removing
the detail from the server has failedpublic boolean replaceDetail(ServerStoredDetails.GenericDetail currentDetailValue, ServerStoredDetails.GenericDetail newDetailValue) throws java.lang.ClassCastException, OperationFailedException
replaceDetail
in interface OperationSetServerStoredAccountInfo
currentDetailValue
- the detail value we'd like to replace.newDetailValue
- the value of the detail that we'd like to
replace currentDetailValue with.java.lang.ClassCastException
- if newDetailValue is not an instance of
the same class as currentDetailValue.OperationFailedException
- with code Network Failure if putting the
new value back online has failedpublic void save() throws OperationFailedException
OperationSetServerStoredAccountInfo
save
in interface OperationSetServerStoredAccountInfo
OperationFailedException
- with code Network Failure if putting the
new values back online has failed.public void registrationStateChanged(RegistrationStateChangeEvent evt)
registrationStateChanged
in interface RegistrationStateChangeListener
evt
- the event describing the status change.void setOurDisplayName(java.lang.String newDisplayName)
void shutdown()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.