[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] Tracking usage of Remote Service at Serverside


i just wanted to try that out and some more questions arise. Please see my comments below

Am 17.10.2014 um 18:31 schrieb Scott Lewis:
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 this service.

I'm using the ecf.generic.server provider and an edef description for discovery if that matters.

To start, you should probably use the org.osgi.service.remoteserviceadmin.RemoteServiceAdmin service.

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:

Collection<ExportReference> getExportedServices();
Collection<ImportReference> getImportedServices();
i tries that and i'm getting a ExportReference for every exported service, but the information I'm seeking seems not to be in there. Basically there is only the EndpointDescription of the exported Servie and the service itself in there.
It's also possible to receive either synchronous or asynchronous notifications from the RemoteServiceAdmin service using the RemoteServiceAdminListener and RemoteServiceAdminEvent.
same here. I see no event on server side when a client connects or disconnects.

What I'm looking for is the number of connected clients (in other words: the number of times the service has been imported by a client) and preferable the ip and/or hostname of the client(s).

Maybe I have misunderstood your suggestions ;)

Any more hints on this would be great!

Thank you!

bye, peter

BTW: I'm using ECF 3.9.3