|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.scr.impl.Activator
public class Activator
This activator is used to cover requirement described in section 112.8.1 @@ -27,14 37,202 @@ in active bundles.
Constructor Summary | |
---|---|
Activator()
|
Method Summary | |
---|---|
void |
bundleChanged(BundleEvent event)
Loads and unloads any components provided by the bundle whose state changed. |
static ComponentRegistry |
createComponentRegistry(BundleContext bundleContext)
|
static Object |
getPackageAdmin()
|
static boolean |
hasCtWorkaround()
Returns true if the ds.ctworkaround framework
property has been set to true . |
static void |
log(int level,
Bundle bundle,
String message,
Throwable ex)
Method to actually emit the log message. |
void |
start(BundleContext context)
Registers this instance as a (synchronous) bundle listener and loads the components of already registered bundles. |
void |
stop(BundleContext context)
Unregisters this instance as a bundle listener and unloads all components which have been registered during the active life time of the SCR implementation bundle. |
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 context) throws Exception
start
in interface BundleActivator
context
- The BundleContext
of the SCR implementation
bundle.
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
stop
in interface BundleActivator
context
- The BundleContext
of the SCR implementation
bundle.
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 void bundleChanged(BundleEvent event)
bundleChanged
in interface BundleListener
event
- The BundleEvent
representing the bundle state
change.public static ComponentRegistry createComponentRegistry(BundleContext bundleContext)
public static void log(int level, Bundle bundle, String message, Throwable ex)
level
- The log level to log the message atmessage
- The message to logex
- An optional Throwable
whose stack trace is written,
or null
to not log a stack trace.public static Object getPackageAdmin()
public static boolean hasCtWorkaround()
true
if the ds.ctworkaround
framework
property has been set to true
. Otherwise false
is returned.
If this method returns true
, two workarounds for the OSGi
Compendium R 4.2 CT for Declarative Services are active:
ComponentContext.getProperties()
implementation
always returns the same writeable Dictionary
instead of
a read-only dictionaryConfiguration
objects supplied to
components is ignored.
Setting the ds.ctworkaround
framework property is required
to pass the CT but setting the property in a productive environment
is strongly discouraged.
true
if the ds.ctworkaround
framework
property is set to true
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |