Package org.eclipse.equinox.concurrent.future

Examples of org.eclipse.equinox.concurrent.future.IFuture


  protected void invokeFuture(Class cls, IRemoteService remoteService,
      IRemoteCall remoteCall) throws InterruptedException,
      InvocationTargetException, OperationCanceledException {
    // Make async call with future result
    final IFuture asyncResult = remoteService.callAsync(remoteCall);
    // Call blocking get and show result
    showResult(cls.getName(), remoteCall, asyncResult.get());
  }
View Full Code Here


    if (remoteService == null)
      return;
    // We've got the remote service, so we're good to go
    assertTrue(remoteService != null);
    traceCallStart("callAsynchResult");
    final IFuture result = remoteService.callAsync(createRemoteConcat(
        "ECF AsynchResults ", "are cool"));
    traceCallEnd("callAsynch");
    assertNotNull(result);
    Thread.sleep(SLEEPTIME);
  }
View Full Code Here

    if (remoteService == null) return;
    // We've got the remote service, so we're good to go
    assertTrue(remoteService != null);
    traceCallStart("callAsynchResult");
    final IFuture result = remoteService
        .callAsync(createRemoteConcat("ECF AsynchResults ", "are cool"));
    traceCallEnd("callAsynch");
    assertNotNull(result);
    Thread.sleep(SLEEPTIME);
  }
View Full Code Here

    }
  }

  public void testAsyncCall() {
    IRemoteService restClientService = getRemoteServiceClientContainerAdapter(container).getRemoteService(registration.getReference());
    IFuture future = restClientService.callAsync(RestCallFactory.createRestCall(IUserTimeline.class.getName() + ".getUserStatuses"));
    try {
      Object response = future.get();
      assertTrue(response instanceof IUserStatus[]);
    } catch (OperationCanceledException e) {
      fail(e.getMessage());
    } catch (InterruptedException e) {
      fail(e.getMessage());
View Full Code Here

    if (remoteService == null) return;
    // We've got the remote service, so we're good to go
    assertTrue(remoteService != null);
    traceCallStart("callAsynchResult");
    final IFuture result = remoteService
        .callAsync(createRemoteConcat("ECF AsynchResults ", "are cool"));
    traceCallEnd("callAsynch");
    assertNotNull(result);
    Thread.sleep(SLEEPTIME);
  }
View Full Code Here

    if (remoteService == null) return;
    // We've got the remote service, so we're good to go
    assertTrue(remoteService != null);
    traceCallStart("callAsynchResult");
    final IFuture result = remoteService
        .callAsync(createRemoteConcat("ECF AsynchResults ", "are cool"));
    traceCallEnd("callAsynch");
    assertNotNull(result);
    Thread.sleep(SLEEPTIME);
  }
View Full Code Here

  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

  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

    if (remoteService == null) return;
    // We've got the remote service, so we're good to go
    assertTrue(remoteService != null);
    traceCallStart("callAsynchResult");
    final IFuture result = remoteService
        .callAsync(createRemoteConcat("ECF AsynchResults ", "are cool"));
    traceCallEnd("callAsynch");
    assertNotNull(result);
    Thread.sleep(SLEEPTIME);
  }
View Full Code Here

  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

TOP

Related Classes of org.eclipse.equinox.concurrent.future.IFuture

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.