Service Activator Toolkit
Version 1.1.0 (20081206)

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

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

public abstract class ManagedServiceBundleActivator
extends BaseBundleActivator
implements ManagedService


Field Summary
protected static String CONFIGURATION_ADMIN_SERVICE_NAME
           
protected static String MANAGED_SERVICE_SERVICE_NAME
           
 
Fields inherited from class org.eclipse.soda.sat.core.framework.BaseBundleActivator
NO_SERVICES
 
Constructor Summary
ManagedServiceBundleActivator()
           
 
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  IManagedServiceAdvisor createAdvisor()
          Create the IManagedServiceAdvisor that knows how to create and destroy the exported service that is managed by the service.
protected  String createDefaultPid()
          Create the default PID for the ManagedService.
protected  String createPid()
          Create the PID for the ManagedService.
protected  void deactivate()
          Hook API: You have been deactivated.
protected  String getPid()
          Get the persistent ID for the ManagedService.
protected  boolean isProxyService()
          Query whether the managed service is created as a proxy service.
 void updated(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_SERVICE_NAME

protected static final String MANAGED_SERVICE_SERVICE_NAME
Constructor Detail

ManagedServiceBundleActivator

public ManagedServiceBundleActivator()
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 IManagedServiceAdvisor createAdvisor()
Create the IManagedServiceAdvisor that knows how to create and destroy the exported service that is managed by the service.

Returns:
An IManagedServiceAdvisor.

createDefaultPid

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

Returns:
The default PID of the ManagedService.

createPid

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

Returns:
The PID of the ManagedService.

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()

getPid

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

Returns:
The pid.

isProxyService

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

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

updated

public void updated(Dictionary properties)
             throws ConfigurationException
Specified by:
updated in interface ManagedService
Throws:
ConfigurationException
See Also:
ManagedService.updated(java.util.Dictionary)

Service Activator Toolkit
Version 1.1.0 (20081206)