Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.jabber
Class ProtocolProviderFactoryJabberImpl

java.lang.Object
  extended by net.java.sip.communicator.service.protocol.ProtocolProviderFactory
      extended by net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderFactoryJabberImpl

public class ProtocolProviderFactoryJabberImpl
extends ProtocolProviderFactory

The Jabber implementation of the ProtocolProviderFactory.

Author:
Damian Minkov

Field Summary
static String IS_USE_JINGLE_NODES
          Indicates if ICE should be used.
 
Fields inherited from class net.java.sip.communicator.service.protocol.ProtocolProviderFactory
ACCOUNT_DISPLAY_NAME, ACCOUNT_ICON_PATH, ACCOUNT_UID, AUTHORIZATION_NAME, AUTO_CHANGE_USER_NAME, AUTO_DISCOVER_JINGLE_NODES, AUTO_DISCOVER_STUN, AUTO_GENERATE_RESOURCE, CLIENT_TLS_CERTIFICATE, DEFAULT_ENCRYPTION, DEFAULT_SIPZRTP_ATTRIBUTE, DISPLAY_NAME, FORCE_P2P_MODE, FORCE_PROXY_BYPASS, IS_ACCOUNT_DISABLED, IS_ALLOW_NON_SECURE, IS_CALLING_DISABLED_FOR_ACCOUNT, IS_DESKTOP_STREAMING_DISABLED, IS_PREFERRED_PROTOCOL, IS_PRESENCE_ENABLED, IS_PROTOCOL_HIDDEN, IS_SERVER_OVERRIDDEN, IS_USE_GOOGLE_ICE, IS_USE_ICE, IS_USE_UPNP, KEEP_ALIVE_INTERVAL, KEEP_ALIVE_METHOD, MODE_PARANOIA, NO_PASSWORD_REQUIRED, PASSWORD, POLLING_PERIOD, PREFERRED_CLEAR_PORT_PROPERTY_NAME, PREFERRED_SECURE_PORT_PROPERTY_NAME, PREFERRED_TRANSPORT, PROTOCOL, PROTOCOL_ICON_PATH, PROXY_ADDRESS, PROXY_ADDRESS_VALIDATED, PROXY_AUTO_CONFIG, PROXY_PASSWORD, PROXY_PORT, PROXY_TRANSPORT, PROXY_TYPE, PROXY_USERNAME, registeredAccounts, RESOURCE, RESOURCE_PRIORITY, SAVP_MANDATORY, SAVP_OFF, SAVP_OPTION, SAVP_OPTIONAL, SDES_CIPHER_SUITES, SDES_ENABLED, SERVER_ADDRESS, SERVER_ADDRESS_VALIDATED, SERVER_PORT, SERVER_TRANSPORT, SMS_SERVER_ADDRESS, STRATEGY, STUN_ADDRESS, STUN_IS_TURN_SUPPORTED, STUN_PASSWORD, STUN_PORT, STUN_PREFIX, STUN_USERNAME, SUBSCRIPTION_EXPIRATION, USE_DEFAULT_STUN_SERVER, USE_JITSI_VIDEO_BRIDGE, USER_ID, VOICEMAIL_CHECK_URI, VOICEMAIL_ENABLED, VOICEMAIL_URI
 
Constructor Summary
protected ProtocolProviderFactoryJabberImpl()
          Creates an instance of the ProtocolProviderFactoryJabberImpl.
 
Method Summary
protected  AccountID createAccountID(String userID, Map<String,String> accountProperties)
          Create an account.
protected  ProtocolProviderService createService(String userID, AccountID accountID)
          Initializes a new ProtocolProviderService instance with a specific user ID to represent a specific AccountID.
 AccountID installAccount(String userIDStr, Map<String,String> accountProperties)
          Initializes and creates an account corresponding to the specified accountProperties and registers the resulting ProtocolProvider in the context BundleContext parameter.
 void modifyAccount(ProtocolProviderService protocolProvider, Map<String,String> accountProperties)
          Modify an existing account.
protected  void storeAccount(AccountID accountID)
          Ovverides the original in order give access to protocol implementation.
 
Methods inherited from class net.java.sip.communicator.service.protocol.ProtocolProviderFactory
createAccount, findAccountPrefix, getBundleContext, getProtocolName, getProviderForAccount, getRegisteredAccounts, loadAccount, loadAccount, loadPassword, loadPassword, removeStoredAccount, stop, stop, storeAccount, storePassword, storePassword, uninstallAccount, unloadAccount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IS_USE_JINGLE_NODES

public static final String IS_USE_JINGLE_NODES
Indicates if ICE should be used.

See Also:
Constant Field Values
Constructor Detail

ProtocolProviderFactoryJabberImpl

protected ProtocolProviderFactoryJabberImpl()
Creates an instance of the ProtocolProviderFactoryJabberImpl.

Method Detail

storeAccount

protected void storeAccount(AccountID accountID)
Ovverides the original in order give access to protocol implementation.

Overrides:
storeAccount in class ProtocolProviderFactory
Parameters:
accountID - the account identifier.

installAccount

public AccountID installAccount(String userIDStr,
                                Map<String,String> accountProperties)
Initializes and creates an account corresponding to the specified accountProperties and registers the resulting ProtocolProvider in the context BundleContext parameter. This method has a persistent effect. Once created the resulting account will remain installed until removed through the uninstall account method.

Specified by:
installAccount in class ProtocolProviderFactory
Parameters:
userIDStr - the user identifier for the new account
accountProperties - a set of protocol (or implementation) specific properties defining the new account.
Returns:
the AccountID of the newly created account

createAccountID

protected AccountID createAccountID(String userID,
                                    Map<String,String> accountProperties)
Create an account.

Specified by:
createAccountID in class ProtocolProviderFactory
Parameters:
userID - the user ID
accountProperties - the properties associated with the user ID
Returns:
new AccountID

createService

protected ProtocolProviderService createService(String userID,
                                                AccountID accountID)
Description copied from class: ProtocolProviderFactory
Initializes a new ProtocolProviderService instance with a specific user ID to represent a specific AccountID.

The method is a pure factory allowing implementers to specify the runtime type of the created ProtocolProviderService and customize the instance. The caller will later register the returned service with the BundleContext of this factory.

Specified by:
createService in class ProtocolProviderFactory
Parameters:
userID - the user ID to initialize the new instance with
accountID - the AccountID to be represented by the new instance
Returns:
a new ProtocolProviderService instance with the specific user ID representing the specified AccountID

modifyAccount

public void modifyAccount(ProtocolProviderService protocolProvider,
                          Map<String,String> accountProperties)
                   throws NullPointerException
Modify an existing account.

Specified by:
modifyAccount in class ProtocolProviderFactory
Parameters:
protocolProvider - the ProtocolProviderService responsible of the account
accountProperties - modified properties to be set
Throws:
NullPointerException - if any of the arguments is null.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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