SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol
Class ProtocolProviderActivator

java.lang.Object
  extended by net.java.sip.communicator.impl.protocol.ProtocolProviderActivator
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class ProtocolProviderActivator
extends Object
implements org.osgi.framework.BundleActivator

Implements BundleActivator for the purposes of protocol.jar/protocol.provider.manifest.mf and in order to register and start services independent of the specifics of a particular protocol.

Author:
Lubomir Marinov, Yana Stamcheva

Constructor Summary
ProtocolProviderActivator()
           
 
Method Summary
(package private) static ConfigurationService getConfigurationService()
          Gets the ConfigurationService to be used by the classes in the bundle represented by ProtocolProviderActivator.
static ProtocolProviderFactory getProtocolProviderFactory(String protocolName)
          Returns a ProtocolProviderFactory for a given protocol provider.
 void start(org.osgi.framework.BundleContext bundleContext)
          Registers a new AccountManagerImpl instance as an AccountManager service and starts a new SingleCallInProgressPolicy instance to ensure that only one of the Calls accessible in the BundleContext in which this activator is to execute will be in progress and the others will automatically be put on hold.
 void stop(org.osgi.framework.BundleContext bundleContext)
          Unregisters the AccountManagerImpl instance registered as an AccountManager service in start(BundleContext) and stops the SingleCallInProgressPolicy started there as well.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtocolProviderActivator

public ProtocolProviderActivator()
Method Detail

getConfigurationService

static ConfigurationService getConfigurationService()
Gets the ConfigurationService to be used by the classes in the bundle represented by ProtocolProviderActivator.

Returns:
the ConfigurationService to be used by the classes in the bundle represented by ProtocolProviderActivator

getProtocolProviderFactory

public static ProtocolProviderFactory getProtocolProviderFactory(String protocolName)
Returns a ProtocolProviderFactory for a given protocol provider.

Parameters:
protocolName - the name of the protocol, which factory we're looking for
Returns:
a ProtocolProviderFactory for a given protocol provider

start

public void start(org.osgi.framework.BundleContext bundleContext)
Registers a new AccountManagerImpl instance as an AccountManager service and starts a new SingleCallInProgressPolicy instance to ensure that only one of the Calls accessible in the BundleContext in which this activator is to execute will be in progress and the others will automatically be put on hold.

Specified by:
start in interface org.osgi.framework.BundleActivator
Parameters:
bundleContext - the BundleContext in which the bundle activation represented by this BundleActivator executes

stop

public void stop(org.osgi.framework.BundleContext bundleContext)
Unregisters the AccountManagerImpl instance registered as an AccountManager service in start(BundleContext) and stops the SingleCallInProgressPolicy started there as well.

Specified by:
stop in interface org.osgi.framework.BundleActivator
Parameters:
bundleContext - the BundleContext in which the bundle activation represented by this BundleActivator executes

SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

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