felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1390589 - in /felix/trunk/scr/src/main/java/org/apache/felix/scr: Reference.java impl/ScrCommand.java impl/manager/DependencyManager.java
Date Wed, 26 Sep 2012 16:23:50 GMT
Author: djencks
Date: Wed Sep 26 16:23:49 2012
New Revision: 1390589

URL: http://svn.apache.org/viewvc?rev=1390589&view=rev
Log:
FELIX-3677 info command shows all bound references

Modified:
    felix/trunk/scr/src/main/java/org/apache/felix/scr/Reference.java
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/ScrCommand.java
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/Reference.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/Reference.java?rev=1390589&r1=1390588&r2=1390589&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/Reference.java (original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/Reference.java Wed Sep 26 16:23:49
2012
@@ -138,4 +138,5 @@ public interface Reference
      */
     String getUpdatedMethodName();
 
+    ServiceReference[] getBoundServiceReferences();
 }

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/ScrCommand.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/ScrCommand.java?rev=1390589&r1=1390588&r2=1390589&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/ScrCommand.java (original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/ScrCommand.java Wed Sep 26 16:23:49
2012
@@ -34,6 +34,7 @@ import org.apache.felix.scr.impl.config.
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceReference;
 
 /**
  * The <code>ScrCommand</code> class provides the implementations for the
@@ -282,6 +283,14 @@ class ScrCommand
                     out.println(refs[i].isStatic() ? "static" : "dynamic");
                     out.print("    Policy option: ");
                     out.println(refs[i].isReluctant() ? "reluctant" : "greedy");
+                    ServiceReference[] serviceRefs = refs[i].getBoundServiceReferences();
+                    if (serviceRefs != null) {
+                        out.print("    Bound to:");
+                        for (int k = 0; k< serviceRefs.length; k++) {
+                            out.print("        " );
+                            out.println(serviceRefs[k]);
+                        }
+                    }
                 }
             }
 

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java?rev=1390589&r1=1390588&r2=1390589&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
(original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
Wed Sep 26 16:23:49 2012
@@ -767,7 +767,7 @@ public class DependencyManager implement
      * services this instance is bound to or <code>null</code> if no services
      * are actually bound.
      */
-    private ServiceReference[] getBoundServiceReferences()
+    public ServiceReference[] getBoundServiceReferences()
     {
         Map dependencyMap = m_componentManager.getDependencyMap();
         if ( dependencyMap == null )



Mime
View raw message