org.jboss.osgi.common.log
Class LogServiceTracker

java.lang.Object
  extended by org.osgi.util.tracker.ServiceTracker
      extended by org.jboss.osgi.common.log.LogServiceTracker
All Implemented Interfaces:
LogService, ServiceTrackerCustomizer

public class LogServiceTracker
extends ServiceTracker
implements LogService

A combined ServiceTracker/LogService that bundles can use to access the registered LogService. If a LogService is registered, the LogServiceTracker delegates to that LogService. If there is no LogService registered, the LogServiceTracker delegates to the SystemLogService

Since:
11-Apr-2009
Author:
thomas.diesler@jboss.com

Field Summary
 
Fields inherited from class org.osgi.util.tracker.ServiceTracker
context, filter
 
Fields inherited from interface org.osgi.service.log.LogService
LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING
 
Constructor Summary
LogServiceTracker(BundleContext context)
           
 
Method Summary
 Object addingService(ServiceReference reference)
           
 void log(int level, String message)
           
 void log(int level, String message, Throwable exception)
           
 void log(ServiceReference sr, int level, String message)
           
 void log(ServiceReference sr, int level, String message, Throwable exception)
           
 void removedService(ServiceReference reference, Object service)
           
 
Methods inherited from class org.osgi.util.tracker.ServiceTracker
close, getService, getService, getServiceReference, getServiceReferences, getServices, getTrackingCount, modifiedService, open, open, remove, size, waitForService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogServiceTracker

public LogServiceTracker(BundleContext context)
Method Detail

addingService

public Object addingService(ServiceReference reference)
Specified by:
addingService in interface ServiceTrackerCustomizer
Overrides:
addingService in class ServiceTracker

removedService

public void removedService(ServiceReference reference,
                           Object service)
Specified by:
removedService in interface ServiceTrackerCustomizer
Overrides:
removedService in class ServiceTracker

log

public void log(int level,
                String message)
Specified by:
log in interface LogService

log

public void log(int level,
                String message,
                Throwable exception)
Specified by:
log in interface LogService

log

public void log(ServiceReference sr,
                int level,
                String message)
Specified by:
log in interface LogService

log

public void log(ServiceReference sr,
                int level,
                String message,
                Throwable exception)
Specified by:
log in interface LogService


Copyright © 2011. All Rights Reserved.