On 03/03/2014 04:34 PM, Neil Bartlett wrote: > As a supplementary note, today you can use the Discovery and Topology > aspects of OSGi Remote Services without the Distribution aspect for > finding asynchronous endpoints and advertising presence. > > For example suppose you have an AMQP broker, which can be represented as > a URI something like this: "amqp:/hostname:port/exchangeId". You can > advertise a service using a marker interface -- let's call it "Endpoint" > -- setting the URI and service.exported.interfaces property. Then on a > remote machine, you can use DS to inject the Endpoint service into your > client code and get the AMQP URI. The client never directly invokes the > service but uses the URI property to make an out-of-band connection. > > The nice thing about this is you can easily de-advertise the URI by > unpublishing the Endpoint service, so it's a very easy way to indicate > presence.
Hi, FWIW: ECF discovery [1] (which happens to be the underlying discovery layer for ECF's implementation of OSGi remote services) also supports registering a simple marker interface [2] that is then advertised by (pluggable) discovery providers (WAN/LAN/...). On the receiving end one registers a listener [3] via whiteboard pattern. M. [1] http://wiki.eclipse.org/ECF/Discovery_API_Bundle [2] org.eclipse.ecf.discovery.IServiceInfo [3] org.eclipse.ecf.discovery.IServiceListener _______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
