[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ecf-dev] Tracking usage of Remote Service at Serverside
- From: Scott Lewis <slewis@xxxxxxxxxxxxx>
- Date: Fri, 17 Oct 2014 09:31:42 -0700
- Delivered-to: email@example.com
- User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
On 10/17/2014 6:36 AM, Peter Hermsdorf wrote:
I'm providing a Service via DS and would like to add some JMX info to
the server to track the count of currently connected clients using
I'm using the ecf.generic.server provider and an edef description for
discovery if that matters.
What would be the best approach?
There's a lot here, some of which is provided via the OSGi Remote
Service Admin specification, and some of which is provided by ECF's
To start, you should probably use the
org.osgi.service.remoteserviceadmin.RemoteServiceAdmin service. This is
an OSGi service, so you can get access to through ServiceTracker, DS, or
other normal services access techniques.
ECF provides javadocs of this service. Here  are all the ECF
javadocs and here  is the page for RSA specifically. This service is
standardized by the RSA spec, so you can also see all the docs in the
OSGi R6 spec, chapter 122 (although I don't necessarily recommend that :).
As you can see, there are the following methods for accessing
information about exported (RS host), and imported (RS consumer) remote
services handled by a given RSA instance:
The ExportReference and ImportReference classes (in same osgi package)
provide access to some information about each remote service. ECF's
impl of this standard service provides access to other more specific
information if it's needed/desired (i.e. that's not currently available
through the standardized RSA API).
It's also possible to receive either synchronous or asynchronous
notifications from the RemoteServiceAdmin service using the
RemoteServiceAdminListener and RemoteServiceAdminEvent.
ECF has some more docs about RSA ...although it would be desirable to
add much more as part of our Mars push to improve/extend the
Eclipse-based tooling specifically for ECF RSA. I can/will do some of
this based upon community-expressed needs.
It's my hope that in the Mars cycle we/ECF committers can build some
Eclipse-based UI/tools/views for viewing and possibly manipulating ECF
and RSA info. Having input and possibly even tooling contributions on
what info/remote service metadata would be most useful to have available
for dev, testing, debugging, and runtime monitoring of remote services
would be wonderful...so like Peter please speak up if you have specific