sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r1340058 - /sling/trunk/bundles/commons/logservice/src/main/java/org/apache/sling/commons/logservice/internal/LogSupport.java
Date Fri, 18 May 2012 10:00:57 GMT
Author: fmeschbe
Date: Fri May 18 10:00:57 2012
New Revision: 1340058

URL: http://svn.apache.org/viewvc?rev=1340058&view=rev
Log:
SLING-2486 Log bundle event synchronously and add logging for STARTING and STOPPING events

Modified:
    sling/trunk/bundles/commons/logservice/src/main/java/org/apache/sling/commons/logservice/internal/LogSupport.java

Modified: sling/trunk/bundles/commons/logservice/src/main/java/org/apache/sling/commons/logservice/internal/LogSupport.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/logservice/src/main/java/org/apache/sling/commons/logservice/internal/LogSupport.java?rev=1340058&r1=1340057&r2=1340058&view=diff
==============================================================================
--- sling/trunk/bundles/commons/logservice/src/main/java/org/apache/sling/commons/logservice/internal/LogSupport.java
(original)
+++ sling/trunk/bundles/commons/logservice/src/main/java/org/apache/sling/commons/logservice/internal/LogSupport.java
Fri May 18 10:00:57 2012
@@ -26,13 +26,13 @@ import java.util.concurrent.LinkedBlocki
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleEvent;
 import org.osgi.framework.BundleException;
-import org.osgi.framework.BundleListener;
 import org.osgi.framework.Constants;
 import org.osgi.framework.FrameworkEvent;
 import org.osgi.framework.FrameworkListener;
 import org.osgi.framework.ServiceEvent;
 import org.osgi.framework.ServiceListener;
 import org.osgi.framework.ServiceReference;
+import org.osgi.framework.SynchronousBundleListener;
 import org.osgi.service.component.ComponentConstants;
 import org.osgi.service.log.LogEntry;
 import org.osgi.service.log.LogListener;
@@ -43,7 +43,7 @@ import org.slf4j.LoggerFactory;
 /**
  * The <code>LogReaderServiceFactory</code> TODO
  */
-public class LogSupport implements BundleListener, ServiceListener,
+public class LogSupport implements SynchronousBundleListener, ServiceListener,
         FrameworkListener {
 
     /**
@@ -228,15 +228,27 @@ public class LogSupport implements Bundl
             case BundleEvent.INSTALLED:
                 message = "BundleEvent INSTALLED";
                 break;
+            case BundleEvent.RESOLVED:
+                message = "BundleEvent RESOLVED";
+                break;
+            case BundleEvent.STARTING:
+                message = "BundleEvent STARTING";
+                break;
             case BundleEvent.STARTED:
                 message = "BundleEvent STARTED";
                 break;
+            case BundleEvent.STOPPING:
+                message = "BundleEvent STOPPING";
+                break;
             case BundleEvent.STOPPED:
                 // this is special, as we have to fix the listener list for
                 // stopped bundles
                 removeLogListeners(event.getBundle());
                 message = "BundleEvent STOPPED";
                 break;
+            case BundleEvent.UNRESOLVED:
+                message = "BundleEvent UNRESOLVED";
+                break;
             case BundleEvent.UPDATED:
                 message = "BundleEvent UPDATED";
                 break;
@@ -245,12 +257,6 @@ public class LogSupport implements Bundl
                 ungetLogger(event.getBundle());
                 message = "BundleEvent UNINSTALLED";
                 break;
-            case BundleEvent.RESOLVED:
-                message = "BundleEvent RESOLVED";
-                break;
-            case BundleEvent.UNRESOLVED:
-                message = "BundleEvent UNRESOLVED";
-                break;
             default:
                 message = "BundleEvent " + event.getType();
         }



Mime
View raw message