|
Service Activator Toolkit
Version 1.0.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The IBundleActivationManager interface...
FactoryUtility| Method Summary | |
void |
acquireImportedServices()
Configuration Method: Acquire the imported services. |
void |
acquireOptionalImportedServices()
Configuration Method: Acquire the optional imported services. |
void |
addExportedProxyService(Class interfaceType,
IProxyServiceHandler handler,
Dictionary properties)
Configuration Method: Add an exported proxy service. |
void |
addExportedProxyServices(Class[] interfaceTypes,
IProxyServiceHandler handler,
Dictionary properties)
Configuration Method: Add an exported proxy service. |
void |
addExportedService(String name,
Object service,
Dictionary properties)
Configuration Method: Add an exported service with properties. |
void |
addExportedServices(String[] names,
Object service,
Dictionary properties)
Configuration Method: Add multiple exported service with properties. |
void |
addImportedServiceFilter(String name,
String filterString)
Configuration Method: Add an LDAP filter to an imported service. |
void |
addOptionalImportedServiceFilter(String name,
String filterString)
Configuration Method: Add an LDAP filter to an optional imported service. |
Bundle |
getBundle()
OSGi Query Method: Get the bundle. |
BundleContext |
getBundleContext()
OSGi Query Method:: Get the bundle context. |
String |
getBundleSymbolicName()
OSGi Query Method: Query the bundle's manifest for it's Bundle-SymbolicName header. |
File |
getDataDirectory()
Persistent Bundle Storage Method: Get the bundle's private data directory. |
File |
getDataFile(String filename)
Persistent Bundle Storage Method: Open a data file contained in the bundle's private data directory. |
Object |
getExportedService(String name)
Query Method: Get a named exported service object. |
String[] |
getExportedServiceNamesFromManifest()
Deprecated. OSGi R4 has deprecated the Export-Service header. |
Dictionary |
getExportedServiceProperties(String name)
Query Method: Answers the properties of an exported service. |
Dictionary |
getExportedServiceProperties(String name,
Object service)
Query Method: Answers the properties of a specific exported service. |
Object[] |
getExportedServices(String name)
Query Method: Query the exported services. |
InputStream |
getFilePropertiesInputStream()
Query Method: Create an input stream on the default properties file. |
InputStream |
getFilePropertiesInputStream(String filename)
Query Method: Create an input stream on the specified properties file. |
Object |
getImportedService(String name)
Query Method: Get the named imported service. |
Filter |
getImportedServiceFilter(String name)
Query Method: Search for an imported service filter. |
String[] |
getImportedServiceNamesFromManifest()
Deprecated. OSGi R4 has deprecated the Import-Service header. |
Object |
getImportedServiceProperty(String name,
String key)
Query Method: Get the value of an imported service's property. |
String[] |
getImportedServicePropertyKeys(String name)
Query Method: Get the keys of an imported service's properties. |
Object |
getOptionalImportedService(String name)
Query Method: Get the named optional imported service. |
Filter |
getOptionalImportedServiceFilter(String name)
Query Method: Search for an optional imported service filter. |
Properties |
getProperties()
Query API: Create a Properties object out of the
bundle's properties. |
String |
getProperty(String key,
String defaultValue)
Query API: Get the value of a property. |
void |
releaseImportedServices()
Configuration Method: Release the imported services. |
void |
releaseOptionalImportedServices()
Configuration Method: Release the optional imported services. |
void |
removeExportedService(String name)
Configuration Method: Remove the exported service record of the specified type. |
void |
removeExportedService(String name,
Object service)
Configuration Method: Removes the specified exported service. |
void |
removeExportedServices(String name)
Configuration Method: Remove the named exported service domain object. |
void |
removeImportedServiceFilter(String name)
Configuration Method: Removes the LDAP filter for an imported service. |
void |
removeOptionalImportedServiceFilter(String name)
Configuration Method: Removes the LDAP filter for an optional imported service. |
void |
restartFramework()
OSGi Framework Method: Stop and restart the OSGi framework. |
void |
setExportedServiceProperties(String name,
Dictionary properties)
Configuration Method: Sets the properties of an exported service. |
void |
setExportedServiceProperties(String name,
Object service,
Dictionary properties)
Configuration Method: Sets the properties of an exported service. |
void |
shutdownFramework()
OSGi Framework Method: Shutdown the OSGi framework. |
void |
start(BundleContext context,
IBundleActivationManagerOwner owner)
Start the bundle activation manager. |
void |
stop(BundleContext context)
Stop the bundle activation manager. |
| Method Detail |
public void acquireImportedServices()
public void acquireOptionalImportedServices()
public void addExportedProxyService(Class interfaceType,
IProxyServiceHandler handler,
Dictionary properties)
interfaceType - The interface used to create the proxy service and
register it with the OSGi framework.handler - The proxy service's handler.properties - The properties to be registered with the service.
public void addExportedProxyServices(Class[] interfaceTypes,
IProxyServiceHandler handler,
Dictionary properties)
interfaceTypes - The interfaces used to create the proxy service
and register it with the OSGi framework.handler - The proxy service's handler.properties - The properties to be registered with the service.
public void addExportedService(String name,
Object service,
Dictionary properties)
name - The name of an exported service.service - The service.properties - The properties to be registered with the service.
public void addExportedServices(String[] names,
Object service,
Dictionary properties)
names - An array of exported service names.service - The service.properties - The properties to be registered with the services.
public void addImportedServiceFilter(String name,
String filterString)
name - The name of the imported service.filterString - The LDAP filter to be used for acquiring the
imported service.
public void addOptionalImportedServiceFilter(String name,
String filterString)
name - The name of the optional imported service.filterString - The LDAP filter to be used for acquiring the
optional imported service.public Bundle getBundle()
Bundle object, or null.public BundleContext getBundleContext()
BundleContext, or null.public String getBundleSymbolicName()
Bundle-SymbolicName header.
public File getDataDirectory()
getDataFile(String)public File getDataFile(String filename)
filename - The name of the persistent data file.
getDataDirectory()public Object getExportedService(String name)
name - The name of the exported service.
null.public String[] getExportedServiceNamesFromManifest()
public Dictionary getExportedServiceProperties(String name)
name - The name of the exported service.
Dictionary containing the exported service's
properties.
public Dictionary getExportedServiceProperties(String name,
Object service)
name - The name of the exported service.service - The exported service.
Dictionary containing the exported service's
properties.public Object[] getExportedServices(String name)
name - The name of the exported service.
public InputStream getFilePropertiesInputStream()
throws IOException
IOException
public InputStream getFilePropertiesInputStream(String filename)
throws IOException
filename - The name of the properties file.
IOExceptionpublic Object getImportedService(String name)
activate()
or deactivate() method.
requiresAllImportedServices() has not
been implemented to return false.
name parameter is the name of a service that is
imported by the bundle and documented as such using the bundle
manifest's Import-Service header.
null.
name - The name of the imported service.
null if no match is found.IBundleActivationManagerOwner.activate(),
IBundleActivationManagerOwner.deactivate()public Filter getImportedServiceFilter(String name)
name - The name of the imported service.
null if no filter exists.public String[] getImportedServiceNamesFromManifest()
public Object getImportedServiceProperty(String name,
String key)
name - The name of the imported service.key - The key of the imported service property.
null if the
property cannot be found.public String[] getImportedServicePropertyKeys(String name)
name - The name of the imported service.
null if no
properties exist.public Object getOptionalImportedService(String name)
name - The name of the optional imported service.
null if no match is found.public Filter getOptionalImportedServiceFilter(String name)
name - The name of the optional imported service.
null if no filter exists.public Properties getProperties()
Properties object out of the
bundle's properties. This method does not cache the Properties
object. The properties are obtained using the query method
getPropertiesInputStream(), which is typically overridden by
subclasses that define properties.
public String getProperty(String key,
String defaultValue)
key - The property key.defaultValue - The default value for the property.
public void releaseImportedServices()
public void releaseOptionalImportedServices()
public void removeExportedService(String name)
IExportServiceRecord can represent
multiple distinct service names, this method will remove all
IExportServiceRecord occurrences, regardless of the
specified service name. The specified service name is simply used to
identify the IExportServiceRecord. While this method is
visible to subclasses, it is not typically used.
Note: All exported services are automatically removed by SAT when the bundle stops.
name - The service name.
public void removeExportedService(String name,
Object service)
IExportServiceRecord can represent multiple
distinct service names, this method will remove all
IExportServiceRecord occurrences, regardless of the
specified service name. The specified service name is simply used to
identify the IExportServiceRecord. While this method
is visible to subclasses, it is not typically used.
Note: All exported services are automatically removed by SAT when the bundle stops.
name - The service name.service - The service.public void removeExportedServices(String name)
Note: All exported services are automatically removed by SAT when the bundle stops.
name - The name of the exported service.public void removeImportedServiceFilter(String name)
name - The name of the imported service.public void removeOptionalImportedServiceFilter(String name)
name - The name of the optional imported service.
public void restartFramework()
throws BundleException
BundleException
public void setExportedServiceProperties(String name,
Dictionary properties)
name - The name of the exported service.properties - The LDAP properties to be registered with the
exported service.
public void setExportedServiceProperties(String name,
Object service,
Dictionary properties)
name - The name of the exported service.service - The service.properties - The LDAP properties to be registered with the exported
service.
public void shutdownFramework()
throws BundleException
BundleException
public void start(BundleContext context,
IBundleActivationManagerOwner owner)
throws Exception
context - The BundleContext for the bundle.owner - The owner of the bundle activation manager.
Exception - when the bundle activation manager fails to start.
public void stop(BundleContext context)
throws Exception
context - The BundleContext for the bundle.
Exception - when the bundle activation manager fails to stop.
|
Service Activator Toolkit
Version 1.0.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 2001, 2007 IBM Corporation and others. All Rights Reserved.