servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r706874 - in /servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core: DynamicReferenceImpl.java EndpointRegistryImpl.java
Date Wed, 22 Oct 2008 07:05:19 GMT
Author: gnodet
Date: Wed Oct 22 00:05:19 2008
New Revision: 706874

URL: http://svn.apache.org/viewvc?rev=706874&view=rev
Log:
Improve toString() representation for dynamic references and filters

Modified:
    servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/DynamicReferenceImpl.java
    servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/EndpointRegistryImpl.java

Modified: servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/DynamicReferenceImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/DynamicReferenceImpl.java?rev=706874&r1=706873&r2=706874&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/DynamicReferenceImpl.java
(original)
+++ servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/DynamicReferenceImpl.java
Wed Oct 22 00:05:19 2008
@@ -68,4 +68,8 @@
         this.matches = null;
     }
 
+    public String toString() {
+        return "DynamicReference[filter=" + filter + "]";
+    }
+
 }

Modified: servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/EndpointRegistryImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/EndpointRegistryImpl.java?rev=706874&r1=706873&r2=706874&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/EndpointRegistryImpl.java
(original)
+++ servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core/EndpointRegistryImpl.java
Wed Oct 22 00:05:19 2008
@@ -202,6 +202,9 @@
                 }
                 return true;
             }
+            public String toString() {
+                return properties.toString();
+            }
         });
         this.references.put(ref, true);
         return ref;
@@ -226,7 +229,7 @@
      * @param filter a LDAP filter used to find matching endpoints
      * @return a new Reference that uses the given filter
      */
-    public Reference lookup(String filter) {
+    public Reference lookup(final String filter) {
         try {
             try {
                 final org.osgi.framework.Filter flt = org.osgi.framework.FrameworkUtil.createFilter(filter);
@@ -235,6 +238,9 @@
                         Map<String, ?> props = EndpointRegistryImpl.this.getProperties(endpoint);
                         return flt.match(new MapToDictionary(props));
                     }
+                    public String toString() {
+                        return filter;
+                    }
                 });
                 this.references.put(ref, true);
                 return ref;



Mime
View raw message