Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 18:54 Go to next message
Victor Sanchez is currently offline Victor SanchezFriend
Messages: 4
Registered: July 2009
Junior Member
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 11:04 Go to previous messageGo to next message
Victor Sanchez is currently offline Victor SanchezFriend
Messages: 4
Registered: July 2009
Junior Member
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 17:32 Go to previous messageGo to next message
Pablo Mising name is currently offline Pablo Mising nameFriend
Messages: 24
Registered: July 2010
Junior Member
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 10:06 Go to previous message
Victor Sanchez is currently offline Victor SanchezFriend
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

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


Current Time: Thu Apr 25 10:59:00 GMT 2024

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

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

Back to the top