Examples of callSync()


Examples of org.eclipse.ecf.remoteservice.IRemoteService.callSync()

  }

  public void testSyncCall() {
    IRemoteService restClientService = getRemoteServiceClientContainerAdapter(container).getRemoteService(registration.getReference());
    try {
      Object result = restClientService.callSync(RestCallFactory.createRestCall(IUserTimeline.class.getName() + ".getUserStatuses"));
      assertNotNull(result);
    } catch (ECFException e) {
      fail("Could not contact the service");
    }
  }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService.callSync()

  }

  public void testSyncCallWithCountParameter() {
    IRemoteService restClientService = getRemoteServiceClientContainerAdapter(container).getRemoteService(registration.getReference());
    try {
      Object result = restClientService.callSync(RestCallFactory.createRestCall(IUserTimeline.class.getName() + ".getUserStatuses", new IRemoteCallParameter[] { new RemoteCallParameter("count", "1") }));
      assertNotNull(result);
      assertTrue(result instanceof IUserStatus[]);
      assertTrue(((IUserStatus[]) result).length == 1);
    } catch (ECFException e) {
      fail("Could not contact the service");
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService.callSync()

  }

  public void testSyncCallWithCountParameter1() {
    IRemoteService restClientService = getRemoteServiceClientContainerAdapter(container).getRemoteService(registration.getReference());
    try {
      Object result = restClientService.callSync(RestCallFactory.createRestCall(IUserTimeline.class.getName() + ".getUserStatuses", new String[] { "1" } ));
      assertNotNull(result);
    } catch (ECFException e) {
      fail("Could not contact the service");
    }
  }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService.callSync()

  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));
   
  }

  public void testSimpleClientAndServerWithFireAsync() throws Exception {
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService.callSync()

  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));
   
  }

  public void testSimpleClientAndServerWithFireAsync() throws Exception {
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService.callSync()

  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

Examples of org.eclipse.ecf.remoteservice.IRemoteService.callSync()

  }
 
  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.callSync()

    if (service == null)
      return;

    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

Examples of org.eclipse.ecf.remoteservice.IRemoteService.callSync()

    if (service == null)
      return;
    // Following should throw exception because "concat1" method does not
    // exist
    try {
      service.callSync(createRemoteCall("concat1", new Object[] {
          "first", "second" }));
      fail();
    } catch (final ECFException e) {
      // Exception should occur
    }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService.callSync()

    }

    // Following should throw exception because wrong number of params for
    // concat
    try {
      service.callSync(createRemoteCall("concat",
          new Object[] { "first" }));
      fail();
    } catch (final ECFException e) {
      // Exception should occur
    }
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.