|
Service Activator Toolkit
Version 1.1.0 (20081206) |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.soda.sat.core.framework.BaseManagedServiceFactoryAdvisor
public abstract class BaseManagedServiceFactoryAdvisor
BaseManagedServiceFactoryAdvisor
is an abstract class from which
bundles typically derive their IManagedServiceFactoryAdvisor
.
This class provides reasonable defaults and no-op implementations of optional
methods from IManagedServiceFactoryAdvisor
, making it easier to
create an advisor.
Field Summary | |
---|---|
protected static String[] |
NO_SERVICES
|
Constructor Summary | |
---|---|
BaseManagedServiceFactoryAdvisor()
|
Method Summary | |
---|---|
protected String[] |
basicGetImportedServiceNames(String pid,
Dictionary oldProperties,
Dictionary properties,
IBundleActivationManager manager)
Get the imported service names. |
protected String[] |
basicGetOptionalImportedServiceNames(String pid,
Dictionary oldProperties,
Dictionary properties,
IBundleActivationManager manager)
Get the optional imported service names. |
protected void |
collectImportedServiceNames(String pid,
Dictionary oldProperties,
Dictionary properties,
IBundleActivationManager manager,
Set serviceNames)
Hook API: This method is extended by subclasses that have required imported services. |
protected void |
collectOptionalImportedServiceNames(String pid,
Dictionary oldProperties,
Dictionary properties,
IBundleActivationManager manager,
Set serviceNames)
Hook API: This method is extended by subclasses that have required imported services. |
void |
createImportedServiceFilters(String pid,
Dictionary oldProperties,
Dictionary properties,
IBundleActivationManager manager)
Create the imported service filters for the configuration with the specified persistent ID and properties. |
void |
destroy(String pid,
Object object,
Dictionary properties,
IBundleActivationManager manager)
Destroy the specified object with the specified persistent ID. |
String[] |
getImportedServiceNames(String pid,
Dictionary oldProperties,
Dictionary properties,
IBundleActivationManager manager)
Get the imported service names for the configuration with the specified persistent ID. |
String[] |
getOptionalImportedServiceNames(String pid,
Dictionary oldProperties,
Dictionary properties,
IBundleActivationManager manager)
Get the optional imported service names for the configuration with the specified persistent ID. |
void |
handleAcquiredOptionalImportedService(String pid,
Object object,
String importedServiceName,
Object importedService,
IBundleActivationManager manager)
This method is called when an optional imported service has been acquired. |
void |
handleReleasedOptionalImportedService(String pid,
Object object,
String importedServiceName,
Object importedService,
IBundleActivationManager manager)
When all imported services are not required, this method is called when an imported service has been released. |
void |
validateConfiguration(String pid,
Dictionary properties)
Validate the configuration, throwing a ConfigurationException if the configuration is deemed to be invalid. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.soda.sat.core.framework.interfaces.IManagedServiceFactoryAdvisor |
---|
create, update |
Field Detail |
---|
protected static final String[] NO_SERVICES
Constructor Detail |
---|
public BaseManagedServiceFactoryAdvisor()
Method Detail |
---|
protected final String[] basicGetImportedServiceNames(String pid, Dictionary oldProperties, Dictionary properties, IBundleActivationManager manager)
pid
- The persistent id for the configuration.oldProperties
- The configuration's old properties.properties
- The configuration's new properties.manager
- The configurations's IBundleActivationManager
.
protected final String[] basicGetOptionalImportedServiceNames(String pid, Dictionary oldProperties, Dictionary properties, IBundleActivationManager manager)
pid
- The persistent id for the configuration.oldProperties
- The configuration's old properties.properties
- The configuration's new properties.manager
- The configurations's IBundleActivationManager
.
protected void collectImportedServiceNames(String pid, Dictionary oldProperties, Dictionary properties, IBundleActivationManager manager, Set serviceNames)
getImportedServiceNames()
.
pid
- The persistent id for the configuration.oldProperties
- The configuration's old properties.properties
- The configuration's new properties.manager
- The configurations's IBundleActivationManager
.serviceNames
- A Set
into which collected service
names must be added.protected void collectOptionalImportedServiceNames(String pid, Dictionary oldProperties, Dictionary properties, IBundleActivationManager manager, Set serviceNames)
getOptionalImportedServiceNames()
.
pid
- The persistent id for the configuration.oldProperties
- The configuration's old properties.properties
- The configuration's new properties.manager
- The configurations's IBundleActivationManager
.serviceNames
- A Set
into which collected service
names must be added.public void createImportedServiceFilters(String pid, Dictionary oldProperties, Dictionary properties, IBundleActivationManager manager)
IManagedServiceFactoryAdvisor
createImportedServiceFilters
in interface IManagedServiceFactoryAdvisor
pid
- The persistent ID for the configuration.oldProperties
- The old properties for the configuration.properties
- The properties for the configuration.manager
- The configurations's IBundleActivationManager
.IManagedServiceFactoryAdvisor.createImportedServiceFilters(java.lang.String, java.util.Dictionary, java.util.Dictionary, org.eclipse.soda.sat.core.framework.interfaces.IBundleActivationManager)
public void destroy(String pid, Object object, Dictionary properties, IBundleActivationManager manager)
IManagedServiceFactoryAdvisor
destroy
in interface IManagedServiceFactoryAdvisor
pid
- The persistent ID for the configuration.object
- The object to destroy.properties
- The properties for the configuration.manager
- The configurations's IBundleActivationManager
.IManagedServiceFactoryAdvisor.destroy(java.lang.String, java.lang.Object, java.util.Dictionary, org.eclipse.soda.sat.core.framework.interfaces.IBundleActivationManager)
public String[] getImportedServiceNames(String pid, Dictionary oldProperties, Dictionary properties, IBundleActivationManager manager)
IManagedServiceFactoryAdvisor
getImportedServiceNames
in interface IManagedServiceFactoryAdvisor
pid
- The persistent ID for the configuration.oldProperties
- The old configuration properties.properties
- The new configuration propertiesmanager
- The configuration's
IBundleActivationManager
.
IManagedServiceFactoryAdvisor.getImportedServiceNames(java.lang.String, java.util.Dictionary, java.util.Dictionary, org.eclipse.soda.sat.core.framework.interfaces.IBundleActivationManager)
public String[] getOptionalImportedServiceNames(String pid, Dictionary oldProperties, Dictionary properties, IBundleActivationManager manager)
IManagedServiceFactoryAdvisor
getOptionalImportedServiceNames
in interface IManagedServiceFactoryAdvisor
pid
- The persistent ID for the configuration.oldProperties
- The old configuration properties.properties
- The new configuration propertiesmanager
- The configuration's
IBundleActivationManager
.
IManagedServiceFactoryAdvisor.getOptionalImportedServiceNames(java.lang.String, java.util.Dictionary, java.util.Dictionary, org.eclipse.soda.sat.core.framework.interfaces.IBundleActivationManager)
public void handleAcquiredOptionalImportedService(String pid, Object object, String importedServiceName, Object importedService, IBundleActivationManager manager)
IManagedServiceFactoryAdvisor
handleAcquiredOptionalImportedService
in interface IManagedServiceFactoryAdvisor
pid
- The persistent id for the configuration.object
- The configured object for the specified
persistent ID.importedServiceName
- The fully-qualified name of the optional
imported service.importedService
- The acquired optional imported service.manager
- The configuration's
IBundleActivationManager
.IManagedServiceFactoryAdvisor.handleAcquiredOptionalImportedService(java.lang.String, java.lang.Object, java.lang.String, java.lang.Object, org.eclipse.soda.sat.core.framework.interfaces.IBundleActivationManager)
public void handleReleasedOptionalImportedService(String pid, Object object, String importedServiceName, Object importedService, IBundleActivationManager manager)
IManagedServiceFactoryAdvisor
handleReleasedOptionalImportedService
in interface IManagedServiceFactoryAdvisor
pid
- The persistent id for the configuration.object
- The object for the specified persistent ID.importedServiceName
- The fully-qualified name of the optional
imported service.importedService
- The released optional imported service.manager
- The configurations's
IBundleActivationManager
.IManagedServiceFactoryAdvisor.handleReleasedOptionalImportedService(java.lang.String, java.lang.Object, java.lang.String, java.lang.Object, org.eclipse.soda.sat.core.framework.interfaces.IBundleActivationManager)
public void validateConfiguration(String pid, Dictionary properties) throws ConfigurationException
IManagedServiceFactoryAdvisor
validateConfiguration
in interface IManagedServiceFactoryAdvisor
pid
- The persistent ID for the configuration.properties
- The properties for the configuration.
ConfigurationException
IManagedServiceFactoryAdvisor.validateConfiguration(java.lang.String, java.util.Dictionary)
|
Service Activator Toolkit
Version 1.1.0 (20081206) |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2001, 2008 IBM Corporation and others. All Rights Reserved.