org.apache.felix.metatype.internal
Class Activator

java.lang.Object
  extended by org.apache.felix.metatype.internal.Activator
All Implemented Interfaces:
BundleActivator

public class Activator
extends Object
implements 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

Constructor Summary
Activator()
           
 
Method Summary
static void log(int level, String message)
           
static void log(int level, String message, Throwable exception)
           
static void log(ServiceReference sr, int level, String message)
           
static void log(ServiceReference sr, int level, String message, Throwable exception)
           
 void start(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(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
 

Constructor Detail

Activator

public Activator()
Method Detail

start

public void start(BundleContext context)
Starts this bundle doing the following:
  1. Register as listener for service events concerning the LogService
  2. Try to get the LogService
  3. Registers the MetaTypeService implementation provided by this bundle.

Specified by:
start in interface BundleActivator
Parameters:
context - The BundleContext of this activator's bundle

stop

public void stop(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 BundleActivator
Parameters:
context - The BundleContext of this activator's bundle

log

public static void log(int level,
                       String message)

log

public static void log(int level,
                       String message,
                       Throwable exception)

log

public static void log(ServiceReference sr,
                       int level,
                       String message)

log

public static void log(ServiceReference sr,
                       int level,
                       String message,
                       Throwable exception)


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.