org.apache.felix.metatype.internal
Class Activator
java.lang.Object
org.apache.felix.metatype.internal.Activator
- All Implemented Interfaces:
- org.osgi.framework.BundleActivator
public class Activator
- extends java.lang.Object
- implements org.osgi.framework.BundleActivator
The Activator class is the BundleActivator of
this bundle and provides abstract logging functionality: If a
LogService is available, that service is used, otherwise
logging goes to standard output or standard error (in case of level ERROR
messages).
- Author:
- fmeschbe
|
Method Summary |
static void |
log(int level,
java.lang.String message)
|
static void |
log(int level,
java.lang.String message,
java.lang.Throwable exception)
|
static void |
log(org.osgi.framework.ServiceReference sr,
int level,
java.lang.String message)
|
static void |
log(org.osgi.framework.ServiceReference sr,
int level,
java.lang.String message,
java.lang.Throwable exception)
|
void |
start(org.osgi.framework.BundleContext context)
Starts this bundle doing the following:
Register as listener for service events concerning the
LogService
Try to get the LogService
Registers the MetaTypeService implementation provided
by this bundle. |
void |
stop(org.osgi.framework.BundleContext context)
Stops this bundle by just unregistering as a service listener. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Activator
public Activator()
start
public void start(org.osgi.framework.BundleContext context)
- Starts this bundle doing the following:
- Register as listener for service events concerning the
LogService
- Try to get the
LogService
- Registers the
MetaTypeService implementation provided
by this bundle.
- Specified by:
start in interface org.osgi.framework.BundleActivator
- Parameters:
context - The BundleContext of this activator's bundle
stop
public void stop(org.osgi.framework.BundleContext context)
- Stops this bundle by just unregistering as a service listener.
The framework will take care of ungetting the LogService and
unregistering the MetaTypeService registered by the
start(BundleContext) method.
- Specified by:
stop in interface org.osgi.framework.BundleActivator
- Parameters:
context - The BundleContext of this activator's bundle
log
public static void log(int level,
java.lang.String message)
log
public static void log(int level,
java.lang.String message,
java.lang.Throwable exception)
log
public static void log(org.osgi.framework.ServiceReference sr,
int level,
java.lang.String message)
log
public static void log(org.osgi.framework.ServiceReference sr,
int level,
java.lang.String message,
java.lang.Throwable exception)