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 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);
    containerManagerServiceTracker.open();

     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 ??

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




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 org.eclipse.ecf.tools.serviceGenerator.wizards

RemoteServiceClientGenWizard.java

RemoteServiceClientGenWizardPage.java

JavaProjectUtils.java


Thanks and Regards
Salinda






On Thu, Aug 22, 2013 at 11:41 AM, Markus Alexander Kuppe <ecf-dev_eclipse.org@xxxxxxxxxxx> wrote:
On 08/21/2013 07:34 PM, Salinda Jayawardana wrote:
> Today I completed  basic Implementation of the client code generation
> wizard, here I have attached few screen shot since code is not available
> in git hub :(

Hi Salinda,

the screenshots don't show much. Please describe in words what use case
the wizard will solve and how the wizard solves it?

M.
_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev


Back to the top