Service Activator Toolkit
Version 1.1.0 (20081206)

org.eclipse.soda.sat.core.framework
Class ManagedServiceFactoryBundleActivator

java.lang.Object
  extended by org.eclipse.soda.sat.core.framework.BaseBundleActivator
      extended by org.eclipse.soda.sat.core.framework.ManagedServiceFactoryBundleActivator
All Implemented Interfaces:
BundleActivator, ManagedServiceFactory

public abstract class ManagedServiceFactoryBundleActivator
extends BaseBundleActivator
implements ManagedServiceFactory

ManagedServiceFactoryBundleActivator is an abstract class from which all SAT managed service factory bundles typically derive their BundleActivator.


Field Summary
protected static String CONFIGURATION_ADMIN_SERVICE_NAME
           
protected static String MANAGED_SERVICE_FACTORY_SERVICE_NAME
           
protected static int NUMBER_OF_CONFIGURATIONS_HINT
           
 
Fields inherited from class org.eclipse.soda.sat.core.framework.BaseBundleActivator
NO_SERVICES
 
Constructor Summary
ManagedServiceFactoryBundleActivator()
           
 
Method Summary
protected  void activate()
          Hook API: This method is overridden by subclasses that wish to execute domain specific activation.
protected  void collectImportedServiceNames(Set serviceNames)
          Hook API: This method is extended by subclasses that have required imported services.
protected abstract  IManagedServiceFactoryAdvisor createAdvisor()
          Create the IManagedServiceFactoryAdvisor that knows how to create and destroy the exported service that is managed by the service factory.
protected  String createDefaultPid()
          Create the default PID for the ManagedServiceFactory.
protected  String createPid()
          Create the PID for the ManagedServiceFactory.
protected  void deactivate()
          Hook API: You have been deactivated.
 void deleted(String pid)
           
 String getName()
           
protected  int getNumberOfConfigurationsHint()
          Get a hint to the number of configurations that will be created for this ManagedServiceFactory.
protected  String getPid()
          Get the persistent ID for the ManagedServiceFactory.
protected  boolean isProxyService()
          Query whether the managed service factory is created as a proxy service.
 void updated(String pid, Dictionary properties)
           
 
Methods inherited from class org.eclipse.soda.sat.core.framework.BaseBundleActivator
acquireImportedService, acquireImportedServices, acquireOptionalImportedServices, addExportedProxyService, addExportedProxyServices, addExportedService, addExportedServices, addImportedServiceFilter, addOptionalImportedServiceFilter, basicGetImportedServiceNames, basicGetOptionalImportedServiceNames, collectOptionalImportedServiceNames, getAsyncStartPriority, getBundle, getBundleActivationManager, getBundleContext, getBundleSymbolicName, getDataDirectory, getDataFile, getExportedService, getExportedServiceNamesFromManifest, getExportedServiceProperties, getExportedServiceProperties, getExportedServices, getExportedServices, getFilePropertiesInputStream, getFilePropertiesInputStream, getImportedService, getImportedServiceFilter, getImportedServiceNames, getImportedServiceNamesFromManifest, getImportedServiceProperty, getImportedServicePropertyKeys, getImportedServices, getOptionalImportedService, getOptionalImportedServiceFilter, getOptionalImportedServiceNames, getOptionalImportedServiceProperty, getOptionalImportedServicePropertyKeys, getOptionalImportedServices, getProperties, getPropertiesInputStream, getProperty, getResourcePropertiesInputStream, getResourcePropertiesInputStream, handleAcquiredOptionalImportedService, handleException, handleFailedToFindProperties, handleReleasedOptionalImportedService, isStartAsync, isTransient, isUninstallable, releaseImportedService, releaseImportedServices, releaseOptionalImportedServices, removeExportedService, removeExportedService, removeExportedServices, removeImportedServiceFilter, removeOptionalImportedServiceFilter, restartFramework, setExportedServiceProperties, setExportedServiceProperties, shutdownFramework, start, start, stop, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIGURATION_ADMIN_SERVICE_NAME

protected static final String CONFIGURATION_ADMIN_SERVICE_NAME

MANAGED_SERVICE_FACTORY_SERVICE_NAME

protected static final String MANAGED_SERVICE_FACTORY_SERVICE_NAME

NUMBER_OF_CONFIGURATIONS_HINT

protected static final int NUMBER_OF_CONFIGURATIONS_HINT
See Also:
Constant Field Values
Constructor Detail

ManagedServiceFactoryBundleActivator

public ManagedServiceFactoryBundleActivator()
Method Detail

activate

protected void activate()
Description copied from class: BaseBundleActivator
Hook API: This method is overridden by subclasses that wish to execute domain specific activation. For example:
 protected void activate() {
     MyDomainObject object = (MyDomainObject) getExportedService(MyService.SERVICE_NAME);
     object.startup();
 }
 

Overrides:
activate in class BaseBundleActivator
See Also:
BaseBundleActivator.activate()

collectImportedServiceNames

protected void collectImportedServiceNames(Set serviceNames)
Description copied from class: BaseBundleActivator
Hook API: This method is extended by subclasses that have required imported services. Note: This method is an alternative to implementing getImportedServiceNames().

Overrides:
collectImportedServiceNames in class BaseBundleActivator
Parameters:
serviceNames - A Set into which collected service names must be added.
See Also:
BaseBundleActivator.collectImportedServiceNames(java.util.Set)

createAdvisor

protected abstract IManagedServiceFactoryAdvisor createAdvisor()
Create the IManagedServiceFactoryAdvisor that knows how to create and destroy the exported service that is managed by the service factory.

Returns:
An IManagedServiceFactoryAdvisor.

createDefaultPid

protected final String createDefaultPid()
Create the default PID for the ManagedServiceFactory.

Returns:
The default PID of the ManagedServiceFactory.

createPid

protected String createPid()
Create the PID for the ManagedServiceFactory.

Returns:
The PID of the ManagedServiceFactory.

deactivate

protected void deactivate()
Description copied from class: BaseBundleActivator
Hook API: You have been deactivated. Concrete subclasses sometimes override this method to execute domain specific deactivation. For example:
 protected void deactivate() {
     MyDomainObject object = (MyDomainObject) getExportedService(MyService.SERVICE_NAME);
     object.shutdown();
 }
 

Overrides:
deactivate in class BaseBundleActivator
See Also:
BaseBundleActivator.deactivate()

deleted

public final void deleted(String pid)
Specified by:
deleted in interface ManagedServiceFactory
See Also:
ManagedServiceFactory.deleted(java.lang.String)

getName

public String getName()
Specified by:
getName in interface ManagedServiceFactory
See Also:
ManagedServiceFactory.getName()

getNumberOfConfigurationsHint

protected int getNumberOfConfigurationsHint()
Get a hint to the number of configurations that will be created for this ManagedServiceFactory.

Returns:
A hint to the number of configurations that will be created.

getPid

protected final String getPid()
Get the persistent ID for the ManagedServiceFactory.

Returns:
The pid.

isProxyService

protected boolean isProxyService()
Query whether the managed service factory is created as a proxy service.

Returns:
True if the managed service factory is created as a proxy service otherwise false.

updated

public final void updated(String pid,
                          Dictionary properties)
                   throws ConfigurationException
Specified by:
updated in interface ManagedServiceFactory
Throws:
ConfigurationException
See Also:
ManagedServiceFactory.updated(java.lang.String, java.util.Dictionary)

Service Activator Toolkit
Version 1.1.0 (20081206)