try {
final org.osgi.framework.Filter flt = org.osgi.framework.FrameworkUtil.createFilter(filter);
DynamicReferenceImpl ref = new DynamicReferenceImpl(this, new Filter<InternalEndpoint>() {
public boolean match(InternalEndpoint endpoint) {
Map<String, ?> props = EndpointRegistryImpl.this.getProperties(endpoint);
return flt.match(new MapToDictionary(props));
}
});
this.references.put(ref, true);
return ref;
} catch (org.osgi.framework.InvalidSyntaxException e) {