Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] in ECF service client, how to get the ID of a service being added?

Scott,
Thanks for your replies!  This worked quite well for me

On the server:
Properties props = new Properties();
props.put("myHostContainerName",containerID.getName());
context.registerService(svcInterfaces,svcImpl,props);

On the client:
public Object addingService(ServiceReference reference) {
		String hostUri = (String)reference.getProperty("myHostContainerName");

Best,
David Donohue

On Tue, Oct 27, 2009 at 11:27 AM, Scott Lewis <slewis@xxxxxxxxxxxxx> wrote:
> Hi David,
>
> Also...for your and everyone else's info, in order to access this
> information more easily for all proxies, I added a method on
> IRemoteServiceProxy to get the remote service reference for a proxy.  This
> allows access to the IRemoteServiceID, and the associated containerID, along
> with other metadata (like service properties).  This will be in future
> versions of ECF (of course).
>
> Scott
>
> David Donohue wrote:
>>
>> Hello,
>> My ECF client is using ServiceTracker to be notified of services from
>> remote servers.  Using generic service.  My method
>> addingService(ServiceReference reference)
>> gets called whenever a new service starts up.  In that method, how can
>> I identify what is the ID/URI of a server that hosts the service?
>> Thanks,
>> David Donohue
>> _______________________________________________
>> ecf-dev mailing list
>> ecf-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/ecf-dev
>>
>
>


Back to the top