|[ecf-dev] p2 discovery|
I've created a equinox server and Eclipse-based client for showing the use of ECF discovery for p2 repository discovery. The attached project set file has the three new plugin projects. The three projects are:
org.eclipse.ecf.p2.discovery.simpleserver -- This IApplication takes two command-line parameters...the metadatarepo service name (how the service appears on the network), and the metadatarepo URL...see the launch configuration. Note this could be embedded in some other server process, or it can/could run as it's own process.
org.eclipse.ecf.p2.discovery.eclipseclient -- This is an eclipse-based client that uses the ECF Service Discovery view. This service discovery view has an extension point called 'serviceAccessHandler' that allows extensions to have a method be called when the user opens the context menu on the given discovered service (represented in the discovery API by IServiceInfo instance). The implementation of this service access handler is extremely simple...all it does when invoked is call the IMetadataRepositoryManager.addRepository(url) with the URL provided as a service property. But this works, and when the user goes to the update manager UI the URL is now there and can be accessed. This client is just a 'quick and dirty' example...I would expect that a better/more appropriate way would be to just have the repo appear in the existing Eclipse UI update manager's sites list (i.e. in some 'Discovered Sites' category or some such).
org.eclipse.ecf.p2.discovery.common -- A trivial plugin that has interfaces, classes, and constants used by both of the above.
Let me know if you want more info on these...I'll write up a wiki page on it and send a note to equinox dev, but may take a short while to get done.
<?xml version="1.0" encoding="UTF-8"?> <psf version="2.0"> <provider id="org.eclipse.team.cvs.core.cvsnature"> <project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/technology,org.eclipse.ecf/incubation/plugins/org.eclipse.ecf.p2.discovery.common,org.eclipse.ecf.p2.discovery.common"/> <project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/technology,org.eclipse.ecf/incubation/plugins/org.eclipse.ecf.p2.discovery.eclipseclient,org.eclipse.ecf.p2.discovery.eclipseclient"/> <project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/technology,org.eclipse.ecf/incubation/plugins/org.eclipse.ecf.p2.discovery.simpleserver,org.eclipse.ecf.p2.discovery.simpleserver"/> </provider> </psf>
Back to the top