felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1743541 - /felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/BundleComponentActivator.java
Date Thu, 12 May 2016 19:05:08 GMT
Author: djencks
Date: Thu May 12 19:05:07 2016
New Revision: 1743541

URL: http://svn.apache.org/viewvc?rev=1743541&view=rev
Log:
extra service event listener logging

Modified:
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/BundleComponentActivator.java

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/BundleComponentActivator.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/BundleComponentActivator.java?rev=1743541&r1=1743540&r2=1743541&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/BundleComponentActivator.java
(original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/BundleComponentActivator.java
Thu May 12 19:05:07 2016
@@ -96,12 +96,13 @@ public class BundleComponentActivator im
 
     private final Map<String, ListenerInfo> listenerMap = new HashMap<String, ListenerInfo>();
 
-    private static class ListenerInfo implements ServiceListener
+    private class ListenerInfo implements ServiceListener
     {
         private Map<Filter, List<ExtendedServiceListener<ExtendedServiceEvent>>>
filterMap = new HashMap<Filter, List<ExtendedServiceListener<ExtendedServiceEvent>>>();
 
         public void serviceChanged(ServiceEvent event)
         {
+            log(LogService.LOG_DEBUG, "Service event: {0}", new Object[] {event}, null, null,
null);
             ServiceReference<?> ref = event.getServiceReference();
             ExtendedServiceEvent extEvent = null;
             ExtendedServiceEvent endMatchEvent = null;
@@ -121,6 +122,7 @@ public class BundleComponentActivator im
                     }
                     for (ExtendedServiceListener<ExtendedServiceEvent> forwardTo :
entry.getValue())
                     {
+                        log(LogService.LOG_DEBUG, "Service event {0} filter {1} forwarding
to: {2}", new Object[] {extEvent, filter, forwardTo}, null, null, null);
                         forwardTo.serviceChanged(extEvent);
                     }
                 }
@@ -133,16 +135,23 @@ public class BundleComponentActivator im
                     }
                     for (ExtendedServiceListener<ExtendedServiceEvent> forwardTo :
entry.getValue())
                     {
+                        log(LogService.LOG_DEBUG, "Service endmatch event {0} filter {1}
forwarding to: {2}", new Object[] {endMatchEvent, filter, forwardTo}, null, null, null);
                         forwardTo.serviceChanged(endMatchEvent);
                     }
                 }
+                else 
+                {
+                    log(LogService.LOG_DEBUG, "Service event {0} filter {1} no match", new
Object[] {endMatchEvent, filter}, null, null, null);
+                }
             }
             if (extEvent != null)
             {
+                log(LogService.LOG_DEBUG, "Service event {0} activating managers", new Object[]
{extEvent}, null, null, null);
                 extEvent.activateManagers();
             }
             if (endMatchEvent != null)
             {
+                log(LogService.LOG_DEBUG, "Service endmatch event {0} activating managers",
new Object[] {endMatchEvent}, null, null, null);
                 endMatchEvent.activateManagers();
             }
         }



Mime
View raw message