Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.ssh
Class ProtocolProviderFactorySSHImpl

java.lang.Object
  extended by net.java.sip.communicator.service.protocol.ProtocolProviderFactory
      extended by net.java.sip.communicator.impl.protocol.ssh.ProtocolProviderFactorySSH
          extended by net.java.sip.communicator.impl.protocol.ssh.ProtocolProviderFactorySSHImpl

public class ProtocolProviderFactorySSHImpl
extends ProtocolProviderFactorySSH

The SSH protocol provider factory creates instances of the SSH protocol provider service. One Service instance corresponds to one account.

Author:
Shobhit Jindal

Field Summary
 
Fields inherited from class net.java.sip.communicator.impl.protocol.ssh.ProtocolProviderFactorySSH
IDENTITY_FILE, KNOWN_HOSTS_FILE
 
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, 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, USER_ID, VOICEMAIL_URI
 
Constructor Summary
ProtocolProviderFactorySSHImpl()
          Creates an instance of the ProtocolProviderFactorySSHImpl.
 
Method Summary
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)
          Initializaed 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
createAccount, findAccountPrefix, getBundleContext, getProtocolName, getProviderForAccount, getRegisteredAccounts, loadAccount, loadAccount, 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

ProtocolProviderFactorySSHImpl

public ProtocolProviderFactorySSHImpl()
Creates an instance of the ProtocolProviderFactorySSHImpl.

Method Detail

installAccount

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

Specified by:
installAccount in class ProtocolProviderFactory
Parameters:
userIDStr - tha/a user identifier uniquely representing the newly created account within the protocol namespace.
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.