Examples of IRemoteService


Examples of org.eclipse.ecf.remoteservice.IRemoteService

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

Examples of org.eclipse.ecf.remoteservice.IRemoteService

    assertTrue(refs == null);
    Thread.sleep(SLEEPTIME);
  }

  public void testGetService() throws Exception {
    final IRemoteService service = registerAndGetRemoteService();
    assertNotNull(service);
    Thread.sleep(SLEEPTIME);
  }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

    assertNotNull(service);
    Thread.sleep(SLEEPTIME);
  }

  public void testGetProxy() throws Exception {
    final IRemoteService service = registerAndGetRemoteService();
    assertNotNull(service);
    Object proxy = service.getProxy();
    assertTrue(proxy instanceof IRemoteServiceProxy);
    Thread.sleep(SLEEPTIME);
  }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

  public void testGetProxyNoRemoteServiceProxy() throws Exception {
    final IRemoteServiceContainerAdapter[] adapters = getRemoteServiceAdapters();
    Properties props = new Properties();
    props.put(Constants.SERVICE_PREVENT_RSPROXY,"true");
    final IRemoteService service = registerAndGetRemoteService(adapters[0], adapters[1],
        getClient(0).getConnectedID(), getIDFilter(),
        IConcatService.class.getName(), customizeProperties(props), SLEEPTIME);
    assertNotNull(service);
    Object proxy = service.getProxy();
    assertTrue(!(proxy instanceof IRemoteServiceProxy));
    Thread.sleep(SLEEPTIME);
  }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

      }
    };
  }

  public void testCallSynch() throws Exception {
    final IRemoteService service = registerAndGetRemoteService();

    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

  protected void traceCallEnd(String callType) {
    System.out.println(callType + " end.");
  }

  public void testBadCallSynch() throws Exception {
    final IRemoteService service = registerAndGetRemoteService();

    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
    }

    // 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

Examples of org.eclipse.ecf.remoteservice.IRemoteService

    }
    Thread.sleep(SLEEPTIME);
  }

  public void testCallAsynch() throws Exception {
    final IRemoteService service = registerAndGetRemoteService();
    if (service == null)
      return;
    traceCallStart("callAsynch");
    service.callAsync(createRemoteConcat("ECF ", "is cool"),
        createRemoteCallListener());
    traceCallEnd("callAsynch");
    Thread.sleep(SLEEPTIME);
  }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

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

  public void testFireAsynch() throws Exception {
    final IRemoteService service = registerAndGetRemoteService();
    if (service == null)
      return;
    traceCallStart("fireAsynch");
    service.fireAsync(createRemoteConcat("Eclipse ", "sucks"));
    traceCallEnd("fireAsynch");
    Thread.sleep(SLEEPTIME);
  }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

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

  public void testProxy() throws Exception {
    final IRemoteService service = registerAndGetRemoteService();
    if (service == null)
      return;
    final IConcatService proxy = (IConcatService) service.getProxy();
    assertNotNull(proxy);
    traceCallStart("getProxy");
    final String result = proxy.concat("ECF ", "sucks");
    traceCallEnd("getProxy", result);
    Thread.sleep(SLEEPTIME);
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.IRemoteService

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

  public void testAsyncResult() throws Exception {
    final IRemoteService service = registerAndGetRemoteService();
    if (service == null)
      return;
    traceCallStart("callAsynchResult");
    final IFuture result = service.callAsync(createRemoteConcat(
        "ECF AsynchResults ", "are cool"));
    traceCallEnd("callAsynchResult", result);
    assertNotNull(result);
    Thread.sleep(SLEEPTIME);
  }
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.