public class MockProvider extends java.lang.Object implements ProtocolProviderService
BIND_RETRIES_DEFAULT_VALUE, BIND_RETRIES_PROPERTY_NAME
Constructor and Description |
---|
MockProvider(java.lang.String userName)
Creates an instance of this mockprovider with a supportedOperationSet-s
map set to contain a single persistent presence operation set.
|
Modifier and Type | Method and Description |
---|---|
void |
addRegistrationStateChangeListener(RegistrationStateChangeListener listener)
Mock implementation of the corresponding ProtocolProviderService method.
|
AccountID |
getAccountID()
Returns the AccountID that uniquely identifies the account represented by
this instance of the ProtocolProviderService.
|
<T extends OperationSet> |
getOperationSet(java.lang.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.
|
java.lang.String |
getProtocolDisplayName()
Mock implementation of the corresponding ProtocolProviderService method.
|
ProtocolIcon |
getProtocolIcon()
Mock implementation of the corresponding ProtocolProviderService method.
|
java.lang.String |
getProtocolName()
Mock implementation of the corresponding ProtocolProviderService method.
|
RegistrationState |
getRegistrationState()
Mock implementation of the corresponding ProtocolProviderService method.
|
java.util.Collection<java.lang.Class<? extends OperationSet>> |
getSupportedOperationSetClasses()
Returns a collection containing all operation sets classes supported by
the current implementation.
|
java.util.Map<java.lang.String,OperationSet> |
getSupportedOperationSets()
Returns an array containing all operation sets supported by the
current implementation.
|
TransportProtocol |
getTransportProtocol()
Returns the "transport" protocol of this instance used to carry the
control channel for the current protocol service.
|
boolean |
isRegistered()
Mock implementation of the corresponding ProtocolProviderService method.
|
boolean |
isRegistrationRequiredForCalling()
Indicates whether or not this provider must registered
when placing outgoing calls.
|
boolean |
isSignalingTransportSecure()
Indicate if the signaling transport of this protocol instance uses a
secure (e.g.
|
void |
register(SecurityAuthority authority)
Mock implementation of the corresponding ProtocolProviderService method.
|
void |
removeRegistrationStateChangeListener(RegistrationStateChangeListener listener)
Mock implementation of the corresponding ProtocolProviderService method.
|
void |
shutdown()
Mock implementation of the corresponding ProtocolProviderService method.
|
void |
unregister()
Mock implementation of the corresponding ProtocolProviderService method.
|
void |
unregister(boolean userRequest)
Mock implementation of the corresponding ProtocolProviderService method.
|
boolean |
validateContactAddress(java.lang.String contactId,
java.util.List<java.lang.String> result)
Always true.
|
public MockProvider(java.lang.String userName)
userName
- an almost ignorable string (any value is accepted) that
should be used when constructing account id'spublic void addRegistrationStateChangeListener(RegistrationStateChangeListener listener)
addRegistrationStateChangeListener
in interface ProtocolProviderService
listener
- a param.public java.lang.String getProtocolName()
getProtocolName
in interface ProtocolProviderService
public java.lang.String getProtocolDisplayName()
getProtocolDisplayName
in interface ProtocolProviderService
public RegistrationState getRegistrationState()
getRegistrationState
in interface ProtocolProviderService
public java.util.Map<java.lang.String,OperationSet> getSupportedOperationSets()
getSupportedOperationSets
in interface ProtocolProviderService
public java.util.Collection<java.lang.Class<? extends OperationSet>> getSupportedOperationSetClasses()
getSupportedOperationSetClasses
in interface ProtocolProviderService
Collection
containing instances of all supported
operation set classes (e.g. OperationSetPresence.class.public <T extends OperationSet> T getOperationSet(java.lang.Class<T> opsetClass)
getOperationSet
in interface ProtocolProviderService
T
- the type which extends OperationSet and which is to
be retrievedopsetClass
- the Class of the operation set that we're
looking for.public boolean isRegistered()
isRegistered
in interface ProtocolProviderService
public void register(SecurityAuthority authority)
register
in interface ProtocolProviderService
authority
- a dummy parampublic void removeRegistrationStateChangeListener(RegistrationStateChangeListener listener)
removeRegistrationStateChangeListener
in interface ProtocolProviderService
listener
- a dummy param.public void shutdown()
shutdown
in interface ProtocolProviderService
public void unregister()
unregister
in interface ProtocolProviderService
public void unregister(boolean userRequest) throws OperationFailedException
unregister
in interface ProtocolProviderService
userRequest
- is the unregister by user request.OperationFailedException
- with the corresponding code it the
registration fails for some reason (e.g. a networking error or an
implementation problem).public boolean isSignalingTransportSecure()
ProtocolProviderService
isSignalingTransportSecure
in interface ProtocolProviderService
public TransportProtocol getTransportProtocol()
getTransportProtocol
in interface ProtocolProviderService
public AccountID getAccountID()
getAccountID
in interface ProtocolProviderService
public boolean validateContactAddress(java.lang.String contactId, java.util.List<java.lang.String> result)
validateContactAddress
in interface ProtocolProviderService
contactId
- the contact identifier to validateresult
- Must be supplied as an empty a list. Implementors add
items:
public ProtocolIcon getProtocolIcon()
getProtocolIcon
in interface ProtocolProviderService
public boolean isRegistrationRequiredForCalling()
ProtocolProviderService
isRegistrationRequiredForCalling
in interface ProtocolProviderService
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.