Examples of IRemoteService


Examples of org.eclipse.ecf.remoteservice.IRemoteService

    assertNotNull(references);
    assertTrue(references.length == 1);
  }

  public void testCallAsynch() throws Exception {
    final IRemoteService service = getRemoteService(targetID,
        getRemoteServiceClass().getName(), getRemoteServiceFilter());
    assertNotNull(service);
    traceCallStart("callAsynch");
    service.callAsync(createRemoteConcat("ECF ", "is cool"),
        createRemoteCallListener());
    traceCallEnd("callAsynch");
    Thread.sleep(ASYNC_WAITTIME);
  }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

    traceCallEnd("callAsynch");
    Thread.sleep(ASYNC_WAITTIME);
  }

  public void testFireAsynch() throws Exception {
    final IRemoteService service = getRemoteService(targetID,
        getRemoteServiceClass().getName(), getRemoteServiceFilter());
    assertNotNull(service);
    traceCallStart("fireAsynch");
    service.fireAsync(createRemoteConcat("Eclipse ", "sucks"));
    traceCallEnd("fireAsynch");
    Thread.sleep(ASYNC_WAITTIME);
  }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

    traceCallEnd("fireAsynch");
    Thread.sleep(ASYNC_WAITTIME);
  }

  public void testProxy() throws Exception {
    final IRemoteService service = getRemoteService(targetID,
        getRemoteServiceClass().getName(), getRemoteServiceFilter());
    assertNotNull(service);
    final IConcatService proxy = (IConcatService) service.getProxy();
    assertNotNull(proxy);
    traceCallStart("getProxy");
    final String result = proxy.concat("ECF ", "sucks");
    traceCallEnd("getProxy", result);
    Thread.sleep(ASYNC_WAITTIME);
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

    traceCallEnd("getProxy", result);
    Thread.sleep(ASYNC_WAITTIME);
  }

  public void testAsyncResult() throws Exception {
    final IRemoteService service = getRemoteService(targetID,
        getRemoteServiceClass().getName(), getRemoteServiceFilter());
    assertNotNull(service);
    traceCallStart("callAsynchResult");
    final IFuture result = service.callAsync(createRemoteConcat(
        "ECF AsynchResults ", "are cool"));
    Thread.sleep(ASYNC_WAITTIME);
    traceCallEnd("callAsynchResult", result);
    assertNotNull(result);
  }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

    String classname = getRemoteServiceClass().getName();
    // Register service locally
    registerLocalService(classname, createRemoteService(),
        createRemoteServiceProperties());
    // Now get remote service
    final IRemoteService service = getRemoteService(targetID,
        getRemoteServiceClass().getName(), getRemoteServiceFilter());
    assertNotNull(service);
    // Now get both
    IRemoteServiceReference[] references = getRemoteServiceReferences(
        new ID[] { rsContainer.getContainer().getID(), targetID }, classname,
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

    registrationCalc.unregister();
    container.disconnect();
  }

  public void testCallViaProxy() {
    IRemoteService rpcClientService = getRemoteServiceClientContainerAdapter(container).getRemoteService(registrationEchoProxy.getReference());
    try {
      IEcho echo = (IEcho) rpcClientService.getProxy(Activator.class.getClassLoader(), new Class[]{IEcho.class});
      assertNotNull(echo);
      Object result = echo.echo(ECHO_TEST_DATA);
      assertNotNull(result);
      assertEquals(result, ECHO_TEST_DATA);
    }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

      fail("Could not contact the service");
    }
  }
 
  public void testCallViaProxy2() {
    IRemoteService rpcClientService = getRemoteServiceClientContainerAdapter(container).getRemoteService(registrationEchoProxy.getReference());
    try {
      IEcho echo = (IEcho) rpcClientService.getProxy();
      assertNotNull(echo);
      Object result = echo.echo(ECHO_TEST_DATA);
      assertNotNull(result);
      assertEquals(result, ECHO_TEST_DATA);
    }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

      fail("Could not contact the service");
    }
  }
 
  public void testSyncCall() {
    IRemoteService rpcClientService = getRemoteServiceClientContainerAdapter(container).getRemoteService(registrationEcho.getReference());   
    try {
      Object result = rpcClientService.callSync(getEchoCall());
      assertNotNull(result);
      assertTrue(ECHO_TEST_DATA.equals(result));
    } catch (ECFException e) {
      fail("Could not contact the service");
    }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

      fail("Could not contact the service");
    }
  }

  public void testAsynCall() {
    IRemoteService rpcClientService = getRemoteServiceClientContainerAdapter(container).getRemoteService(registrationCalc.getReference());
    IFuture future = rpcClientService.callAsync(getCalcPlusCall());
    try {
      Object response = future.get();
      assertTrue(response instanceof Integer);
    } catch (OperationCanceledException e) {
      fail(e.getMessage());
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

      fail(e.getMessage());
    }
  }
 
  public void testAsyncCallWithListener() throws Exception {
    IRemoteService rpcClientService = getRemoteServiceClientContainerAdapter(container).getRemoteService(registrationCalc.getReference());
    rpcClientService.callAsync(getCalcPlusCall(), new IRemoteCallListener() {
      public void handleEvent(IRemoteCallEvent event) {
        if (event instanceof IRemoteCallCompleteEvent) {
          IRemoteCallCompleteEvent cce = (IRemoteCallCompleteEvent) event;
          Object response = cce.getResponse();
          assertTrue(response instanceof Integer);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.