|
|
|
Re: How to get all discovered endpoint descriptions? [message #769049 is a reply to message #768742] |
Wed, 21 December 2011 10:06 |
Victor Sanchez Messages: 4 Registered: July 2009 |
Junior Member |
|
|
Hi, Pablo!
What I finally did is to mark our services of interest with distinctive specific properties and give less relevance to Endpoints.
You probably already know that the AbstractTopologyManager class contains the Collection 'importedRegistrations' of type ImportRegistration. In AbstractTopologyManager.handleEndpointAdded(...), when an Endpoint is successfully added to the topology, an ImportRegistration is created and added to the 'importedRegistrations' collection. Since it is a protected field you can either try to access its content, or register a parallel topology manager in which you have proper access to that collection.
Provided that the corresponding bundle is already started, you can, as a starting point, get the BasicTopologyManager service instance via code like this:
private EndpointListener getEndpointListener() {
synchronized (endpointListenerTrackerLock) {
if (endpointListenerTracker == null) {
endpointListenerTracker = new ServiceTracker(
getBundleContext(),
EndpointListener.class.getName(), null);
endpointListenerTracker.open();
}
}
return (EndpointListener) endpointListenerTracker.getService();
}
Hope this helps and is not misleading!
Victor
[Updated on: Wed, 21 December 2011 10:07] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04441 seconds