You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2008/10/22 09:05:19 UTC
svn commit: r706874 - in
/servicemix/smx4/nmr/trunk/nmr/core/src/main/java/org/apache/servicemix/nmr/core:
DynamicReferenceImpl.java EndpointRegistryImpl.java
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;