Examples of IRemoteService


Examples of org.eclipse.ecf.remoteservice.IRemoteService

      if (remoteServiceReferences == null
          || remoteServiceReferences.length == 0)
        return null;
      assertEquals(1, remoteServiceReferences.length);

      IRemoteService remoteService = adapter
          .getRemoteService(remoteServiceReferences[0]);
      IExampleService remoteServiceUser = (IExampleService) remoteService
          .getProxy();
      return remoteServiceUser;
    }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

 
  public void testGetRemoteService() {
    IRemoteServiceRegistration registration = createRestRegistration("resourcePath");
    IRemoteServiceReference reference = registration.getReference();
    assertNotNull(reference);
    IRemoteService remoteService = getRemoteServiceClientContainerAdapter().getRemoteService(reference);
    assertNotNull(remoteService);
  }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

    server = null;
  }
 
  public void testSimpleClientAndServerWithProxy() throws Exception {

    IRemoteService remoteService = client.getRemoteService();
    assertNotNull(remoteService);
    // Use proxy
    String result = ((IConcatService) remoteService.getProxy()).concat(TEST_STRING_1,TEST_STRING_2);
    assertTrue(result != null && result.equals(TEST_STRING_1+TEST_STRING_2));
   
  }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

      }};
  }
 
  public void testSimpleClientAndServerWithCallSync() throws Exception {

    IRemoteService remoteService = client.getRemoteService();
    assertNotNull(remoteService);
    // Use callSync
    String result = (String) remoteService.callSync(getRemoteConcatCall(TEST_STRING_2, TEST_STRING_1));
    assertTrue(result != null && result.equals(TEST_STRING_2+TEST_STRING_1));
   
  }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

   
  }

  public void testSimpleClientAndServerWithFireAsync() throws Exception {

    IRemoteService remoteService = client.getRemoteService();
    assertNotNull(remoteService);
    // Use callSync
    remoteService.fireAsync(getRemoteConcatCall(TEST_STRING_2, TEST_STRING_1));
   
    Thread.sleep(1000);
   
  }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

   
  }

  public void testSimpleClientAndServerWithCallAsync() throws Exception {

    IRemoteService remoteService = client.getRemoteService();
    assertNotNull(remoteService);
    // Use callSync
    remoteService.callAsync(getRemoteConcatCall(TEST_STRING_2, TEST_STRING_1));
   
    Thread.sleep(1000);
   
  }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

  String result = null;
 
  public void testSimpleClientAndServerWithCallAsyncListener() throws Exception {

    IRemoteService remoteService = client.getRemoteService();
    assertNotNull(remoteService);
    // Use callSync
    remoteService.callAsync(getRemoteConcatCall(TEST_STRING_2, TEST_STRING_1),new IRemoteCallListener(){
      public void handleEvent(IRemoteCallEvent event) {
        if (event instanceof IRemoteCallCompleteEvent) {
          result = (String) ((IRemoteCallCompleteEvent) event).getResponse();
        }
      }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

   
  }

  public void testSimpleClientAndServerWithFuture() throws Exception {

    IRemoteService remoteService = client.getRemoteService();
    assertNotNull(remoteService);
    // Use callSync
    IFuture future = remoteService.callAsync(getRemoteConcatCall(TEST_STRING_2, TEST_STRING_1));
    assertNotNull(future);
    String result = (String) future.get();
    assertTrue(result.equals(TEST_STRING_2+TEST_STRING_1));
  }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

      assertTrue(sid.longValue() == rsid.getContainerRelativeID());
    }
  }

  public void testGetService() throws Exception {
    final IRemoteService service = getRemoteService(targetID,
        IConcatService.class.getName(), null);
    assertNotNull(service);
  }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

        IConcatService.class.getName(), null);
    assertNotNull(service);
  }

  public void testCallSynch() throws Exception {
    final IRemoteService service = getRemoteService(targetID,
        IConcatService.class.getName(), null);
    assertNotNull(service);
    traceCallStart("callSynch");
    final Object result = service.callSync(createRemoteConcat("Eclipse ",
        "is cool"));
    traceCallEnd("callSynch", result);

    assertNotNull(result);
    assertTrue(result.equals("Eclipse ".concat("is cool")));
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.