Package org.eclipse.ecf.examples.remoteservices.hello

Examples of org.eclipse.ecf.examples.remoteservices.hello.IHello


  class HelloTrackerCustomizer implements
      ServiceTrackerCustomizer<IHello, IHello> {

    public IHello addingService(ServiceReference<IHello> reference) {
     
      IHello proxy = context.getService(reference);
     
      useHelloService(proxy);
     
      return proxy;
    }
View Full Code Here


  public Object addingService(ServiceReference reference) {
    System.out.println("IHello service proxy being added");
    // Since this reference is for a remote service,
    // The service object returned is a proxy implementing the
    // IHello interface
    IHello proxy = (IHello) bundleContext.getService(reference);
    // Call proxy synchronously.  Note that this call may block or fail due to
    // synchronous communication with remote service
    System.out.println("STARTING remote call via proxy...");
    proxy.hello(CONSUMER_NAME+" via proxy");
    System.out.println("COMPLETED remote call via proxy");
    System.out.println();
    // Call other helloMessage method
    System.out.println("STARTING remote call via proxy...");
    proxy.helloMessage(new HelloMessage(CONSUMER_NAME+" via proxy","howdy"));
    System.out.println("COMPLETED remote call via proxy");
    System.out.println();

    // If the proxy is also an instance of IHelloAsync then use
    // this asynchronous interface to invoke methods asynchronously
View Full Code Here

    Assert.isTrue(helloReferences.length > 0);
    // 4. Get remote service for reference
    IRemoteService remoteService = containerAdapter
        .getRemoteService(helloReferences[0]);
    // 5. Get the proxy
    IHello proxy = (IHello) remoteService.getProxy();
    // 6. Finally...call the proxy
    proxy.hello("RemoteService Consumer");

    // Call asynchronously via listener
    callViaListener(remoteService);
  }
View Full Code Here

  class HelloTrackerCustomizer implements
      ServiceTrackerCustomizer<IHello, IHello> {

    public IHello addingService(ServiceReference<IHello> reference) {
     
      IHello proxy = context.getService(reference);
     
      useHelloService(proxy);
     
      return proxy;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.examples.remoteservices.hello.IHello

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.