Skip to main content



      Home
Home » Archived » Eclipse Communications Framework (ECF) » How to get all discovered endpoint descriptions?
How to get all discovered endpoint descriptions? [message #756713] Mon, 14 November 2011 13:54 Go to next message
Eclipse UserFriend
Hi!

I'm trying to get all currently discovered endpoint descriptions. There is an endpointListenerTracker that says it does the trick. I create and register as a service an EndpointListener class implementing org.osgi.service.remoteserviceadmin.EndpointListener, but endpointAdded is not called ever. I admit I haven't had time to go into this deeply, but any help would be appreciated.

Thank you very much!

Victor
Re: How to get all discovered endpoint descriptions? [message #759314 is a reply to message #756713] Mon, 28 November 2011 06:04 Go to previous messageGo to next message
Eclipse UserFriend
Well, after further research I think the fundamentals of what I needed are well explained in the wiki, at the Remote Services Admin page. I cannot add the link, since I cannot use links in my messages yet in this forum. Sorry about that! Anyways, a quick google search should bring it up.

Cheers!

Victor
Re: How to get all discovered endpoint descriptions? [message #768742 is a reply to message #759314] Tue, 20 December 2011 12:32 Go to previous messageGo to next message
Eclipse UserFriend
Did you finally solved your problem? I've read the RSA page, but I am still interested about how to solve it in an "elegant" way.
Re: How to get all discovered endpoint descriptions? [message #769049 is a reply to message #768742] Wed, 21 December 2011 05:06 Go to previous message
Eclipse UserFriend
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 05:07] by Moderator

Previous Topic:Graphical editors and ECF
Next Topic:problems at installing ECF 3.5.3 on Indigo
Goto Forum:
  


Current Time: Tue Apr 15 02:18:15 EDT 2025

Powered by FUDForum. Page generated in 0.04064 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top