|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.scr.impl.BundleComponentActivator
public class BundleComponentActivator
The BundleComponentActivator is helper class to load and unload Components of a single bundle. It will read information from the metadata.xml file descriptors and create the corresponding managers.
Method Summary | |
---|---|
void |
disableComponent(String name)
Implements the ComponentContext.disableComponent(String)
method by first finding the component(s) for the name and
then starting a thread to actually disable all components found. |
void |
enableComponent(String name)
Implements the ComponentContext.enableComponent(String)
method by first finding the component(s) for the name and
then starting a thread to actually enable all components found. |
BundleContext |
getBundleContext()
Returns the BundleContext |
ScrConfiguration |
getConfiguration()
|
boolean |
isLogEnabled(int level)
Returns true if logging for the given level is enabled. |
void |
log(int level,
String message,
ComponentMetadata metadata,
Throwable ex)
Method to actually emit the log message. |
void |
log(int level,
String pattern,
Object[] arguments,
ComponentMetadata metadata,
Throwable ex)
Method to actually emit the log message. |
long |
registerComponentId(AbstractComponentManager componentManager)
|
void |
schedule(Runnable task)
Schedules the given task for asynchrounous execution or
synchronously runs the task if the thread is not running. |
void |
unregisterComponentId(AbstractComponentManager componentManager)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public BundleContext getBundleContext()
public ScrConfiguration getConfiguration()
public void enableComponent(String name)
ComponentContext.enableComponent(String)
method by first finding the component(s) for the name
and
then starting a thread to actually enable all components found.
If no component matching the given name is found the thread is not started and the method does nothing.
name
- The name of the component to enable or null
to
enable all components.public void disableComponent(String name)
ComponentContext.disableComponent(String)
method by first finding the component(s) for the name
and
then starting a thread to actually disable all components found.
If no component matching the given name is found the thread is not started and the method does nothing.
name
- The name of the component to disable or null
to
disable all components.public long registerComponentId(AbstractComponentManager componentManager)
public void unregisterComponentId(AbstractComponentManager componentManager)
public void schedule(Runnable task)
task
for asynchrounous execution or
synchronously runs the task if the thread is not running. If this instance
is not active
, the task is not executed.
task
- The component task to executepublic boolean isLogEnabled(int level)
true
if logging for the given level is enabled.
isLogEnabled
in interface Logger
public void log(int level, String pattern, Object[] arguments, ComponentMetadata metadata, Throwable ex)
log
in interface Logger
level
- The log level to log the message atpattern
- The java.text.MessageFormat
message format
string for preparing the messagearguments
- The format arguments for the pattern
string.ex
- An optional Throwable
whose stack trace is written,
or null
to not log a stack trace.public void log(int level, String message, ComponentMetadata metadata, Throwable ex)
log
in interface Logger
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.metadata
- The ComponentMetadata
whose processing caused
the message. This may be null
if the component
metadata is not known or applicable.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |