|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.transaction.internal.Activator
public class Activator
Constructor Summary | |
---|---|
Activator()
|
Method Summary | |
---|---|
void |
deleted(String pid)
Remove a factory instance. |
String |
getName()
Return a descriptive name of this factory. |
void |
start(BundleContext bundleContext)
Called when this bundle is started so the Framework can perform the bundle-specific activities necessary to start this bundle. |
void |
stop(BundleContext context)
Called when this bundle is stopped so the Framework can perform the bundle-specific activities necessary to stop the bundle. |
void |
updated(String pid,
Dictionary properties)
Create a new instance, or update the configuration of an existing instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Activator()
Method Detail |
---|
public void start(BundleContext bundleContext) throws Exception
BundleActivator
This method must complete and return to its caller in a timely manner.
start
in interface BundleActivator
bundleContext
- The execution context of the bundle being started.
Exception
- If this method throws an exception, this
bundle is marked as stopped and the Framework will remove this
bundle's listeners, unregister all services registered by this
bundle, and release all services used by this bundle.public void stop(BundleContext context) throws Exception
BundleActivator
BundleActivator.start
method started. There should be no active threads that were started by
this bundle when this bundle returns. A stopped bundle must not call any
Framework objects.
This method must complete and return to its caller in a timely manner.
stop
in interface BundleActivator
context
- The execution context of the bundle being stopped.
Exception
- If this method throws an exception, the
bundle is still marked as stopped, and the Framework will remove
the bundle's listeners, unregister all services registered by the
bundle, and release all services used by the bundle.public String getName()
ManagedServiceFactory
getName
in interface ManagedServiceFactory
public void updated(String pid, Dictionary properties) throws ConfigurationException
ManagedServiceFactory
Configuration
object is new for the
Managed Service Factory, then create a new factory instance, using the
configuration properties
provided. Else, update the
service instance with the provided properties
.
If the factory instance is registered with the Framework, then the
configuration properties
should be copied to its registry
properties. This is not mandatory and security sensitive properties
should obviously not be copied.
If this method throws any Exception
, the Configuration
Admin service must catch it and should log it.
When the implementation of updated detects any kind of error in the
configuration properties, it should create a new
ConfigurationException
which describes the problem.
The Configuration Admin service must call this method asynchronously.
This implies that implementors of the ManagedServiceFactory
class can be assured that the callback will not take place during
registration when they execute the registration in a synchronized method.
updated
in interface ManagedServiceFactory
pid
- The PID for this configuration.properties
- A copy of the configuration properties. This argument
must not contain the service.bundleLocation" property. The value
of this property may be obtained from the
Configuration.getBundleLocation
method.
ConfigurationException
- when the configuration properties are
invalid.public void deleted(String pid)
ManagedServiceFactory
If this method throws any Exception
, the Configuration
Admin service must catch it and should log it.
The Configuration Admin service must call this method asynchronously.
deleted
in interface ManagedServiceFactory
pid
- the PID of the service to be removed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |