Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.icq
Class ProtocolProviderFactoryIcqImpl

java.lang.Object
  extended by net.java.sip.communicator.service.protocol.ProtocolProviderFactory
      extended by net.java.sip.communicator.impl.protocol.icq.ProtocolProviderFactoryIcqImpl

public class ProtocolProviderFactoryIcqImpl
extends ProtocolProviderFactory

The ICQ implementation of the ProtocolProviderFactory.

Author:
Emil Ivov

Field Summary
 
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_JINGLE_NODES, 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 ProtocolProviderFactoryIcqImpl(boolean isAimFactory)
          Creates an instance of the ProtocolProviderFactoryIcqImpl.
 
Method Summary
 AccountID createAccount(Map<String,String> accountProperties)
          Initializes and creates an account corresponding to the specified accountProperties.
protected  AccountID createAccountID(String userID, Map<String,String> accountProperties)
          Creates a new AccountID instance with a specific user ID to represent a given set of account properties.
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.
 boolean loadAccount(AccountID accountID)
          Creates a protocol provider for the given accountID and registers it in the bundle context.
 AccountID loadAccount(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)
          Modifies the account corresponding to the specified accountID.
 
Methods inherited from class net.java.sip.communicator.service.protocol.ProtocolProviderFactory
findAccountPrefix, getBundleContext, getProtocolName, getProviderForAccount, getRegisteredAccounts, loadPassword, loadPassword, removeStoredAccount, stop, stop, storeAccount, storeAccount, storePassword, storePassword, uninstallAccount, unloadAccount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtocolProviderFactoryIcqImpl

protected ProtocolProviderFactoryIcqImpl(boolean isAimFactory)
Creates an instance of the ProtocolProviderFactoryIcqImpl.

Parameters:
isAimFactory - whether its an aim factory
Method Detail

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

loadAccount

public AccountID loadAccount(Map<String,String> accountProperties)
Initializes and creates an account corresponding to the specified accountProperties and registers the resulting ProtocolProvider in the context BundleContext parameter.

Overrides:
loadAccount in class ProtocolProviderFactory
Parameters:
accountProperties - a set of protocol (or implementation) specific properties defining the new account.
Returns:
the AccountID of the newly created account

loadAccount

public boolean loadAccount(AccountID accountID)
Creates a protocol provider for the given accountID and registers it in the bundle context. This method has a persistent effect. Once created the resulting account will remain installed until removed through the uninstallAccount method.

Overrides:
loadAccount in class ProtocolProviderFactory
Parameters:
accountID - the account identifier
Returns:
true if the account with the given accountID is successfully loaded, otherwise returns false

createAccount

public AccountID createAccount(Map<String,String> accountProperties)
Initializes and creates an account corresponding to the specified accountProperties.

Overrides:
createAccount in class ProtocolProviderFactory
Parameters:
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)
Description copied from class: ProtocolProviderFactory
Creates a new AccountID instance with a specific user ID to represent a given set of account properties.

The method is a pure factory allowing implementers to specify the runtime type of the created AccountID and customize the instance. The returned AccountID will later be associated with a ProtocolProviderService by the caller (e.g. using ProtocolProviderFactory.createService(String, AccountID)).

Specified by:
createAccountID in class ProtocolProviderFactory
Parameters:
userID - the user ID of the new instance
accountProperties - the set of properties to be represented by the new instance
Returns:
a new AccountID instance with the specified user ID representing the given set of account properties

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
Description copied from class: ProtocolProviderFactory
Modifies the account corresponding to the specified accountID. This method is meant to be used to change properties of already existing accounts. Note that if the given accountID doesn't correspond to any registered account this method would do nothing.

Specified by:
modifyAccount in class ProtocolProviderFactory
Parameters:
protocolProvider - the protocol provider service corresponding to the modified account.
accountProperties - a set of protocol (or implementation) specific properties defining the new account.
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.