Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] [Gsoc][ECF Tooling]-Generate codes for Service Registration & Service Client

Hi Markus

I am  currently working on the service client generating stuff ,  I have almost finish that but now I am facing following problem

I need to add following classpath entry  to my client project

<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>

Still I couldn't find a way to add new classpathenrty , Could you please advise me to how to do this task ??


On Fri, Aug 30, 2013 at 2:37 AM, Markus Alexander Kuppe <> wrote:
On 08/30/2013 04:22 AM, Salinda Jayawardana wrote:
> HI All
> I am thinking to create separate project for service client , these
> screenshots  shows the wizards steps to create that client. But Now I
> have following questions in my mind.
> According to my findings,  service consumer  can be created using
> following code sample (with r-osgi provider)
>     BundleContext context =
> Platform.getBundle(Activator.PLUGIN_ID).getBundleContext();
>     ServiceTracker  containerManagerServiceTracker = new
> ServiceTracker(context, IContainerManager.class.getName(),null);
>      IContainer containerManager =   (IContainerManager)
> containerManagerServiceTracker.getService();
>      container =
> containerManager.getContainerFactory().createContainer("ecf.r_osgi.peer");
>     IRemoteServiceContainerAdapter containerAdapter =
> (IRemoteServiceContainerAdapter) container
>                     .getAdapter(IRemoteServiceContainerAdapter.class);
>             IRemoteServiceReference[] helloReferences = containerAdapter
> .getRemoteServiceReferences(IDFactory.getDefault().createID(container.getConnectNamespace(),
>                             serviceURL), interfaceName, null);
>          IRemoteService   remoteService =
> containerAdapter.getRemoteService(helloReferences[0]);
> 1) I tried out this code sample and it's working for me, But here I need
> Bundle Context So always service consumer should be a bundle is it? if
> not how can I get the  bundle context ??

You a) get the BundleContext passed to you in an OSGi BundleActivator or
you b) use OSGi's FrameworkUtil to get the Bundle of a class which then
allows you to get the BundleContext [2].

> 2)  Where can I find list of available providers.
> ecf.generic.client/server and ecf.r_osgi.peer .etc??

There is no _static_ list of available providers. Providers are either
deployed at runtime or not. The UI should simply reflect this.

> PS:  @Markus
> during this week I couldn’t do good progress since I was completely down
> due to fever, Hopefully complete all the existing works by Monday(2nd
> Sep) will send complete update mail.
> BTW , Still I feel my all my local changes are not sync with the Github,
> Can u see following class and packages
> package

You can check the content of the github repo yourself on-line [1].


ecf-dev mailing list

Back to the top