Search in sources :

Example 6 with IRemoteService

use of org.eclipse.ecf.remoteservice.IRemoteService in project ecf by eclipse.

the class AbstractConcatConsumerTestCase method testCallSynch.

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")));
}
Also used : IRemoteService(org.eclipse.ecf.remoteservice.IRemoteService)

Example 7 with IRemoteService

use of org.eclipse.ecf.remoteservice.IRemoteService in project ecf by eclipse.

the class AbstractConcatConsumerTestCase method testProxy.

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);
}
Also used : IRemoteService(org.eclipse.ecf.remoteservice.IRemoteService)

Example 8 with IRemoteService

use of org.eclipse.ecf.remoteservice.IRemoteService in project ecf by eclipse.

the class AbstractConcatConsumerTestCase method testGetService.

public void testGetService() throws Exception {
    final IRemoteService service = getRemoteService(targetID, IConcatService.class.getName(), null);
    assertNotNull(service);
}
Also used : IRemoteService(org.eclipse.ecf.remoteservice.IRemoteService)

Example 9 with IRemoteService

use of org.eclipse.ecf.remoteservice.IRemoteService in project ecf by eclipse.

the class AbstractConcatConsumerTestCase method testCallAsynch.

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);
}
Also used : IRemoteService(org.eclipse.ecf.remoteservice.IRemoteService)

Example 10 with IRemoteService

use of org.eclipse.ecf.remoteservice.IRemoteService in project ecf by eclipse.

the class AbstractRemoteServiceTest method testProxy.

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);
}
Also used : IRemoteService(org.eclipse.ecf.remoteservice.IRemoteService)

Aggregations

IRemoteService (org.eclipse.ecf.remoteservice.IRemoteService)64 ServiceReference (org.osgi.framework.ServiceReference)11 IFuture (org.eclipse.equinox.concurrent.future.IFuture)10 ECFException (org.eclipse.ecf.core.util.ECFException)9 IRemoteServiceContainerAdapter (org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter)9 IRemoteServiceReference (org.eclipse.ecf.remoteservice.IRemoteServiceReference)8 IRemoteCallListener (org.eclipse.ecf.remoteservice.IRemoteCallListener)6 IRemoteCallCompleteEvent (org.eclipse.ecf.remoteservice.events.IRemoteCallCompleteEvent)6 IRemoteCallEvent (org.eclipse.ecf.remoteservice.events.IRemoteCallEvent)6 IConcatService (org.eclipse.ecf.tests.remoteservice.IConcatService)6 Dictionary (java.util.Dictionary)5 IRemoteServiceProxy (org.eclipse.ecf.remoteservice.IRemoteServiceProxy)5 JSONObject (org.json.JSONObject)5 Hashtable (java.util.Hashtable)4 OperationCanceledException (org.eclipse.core.runtime.OperationCanceledException)4 RemoteServiceTracker (org.eclipse.ecf.remoteservice.util.tracker.RemoteServiceTracker)4 IRemoteServiceRegistration (org.eclipse.ecf.remoteservice.IRemoteServiceRegistration)3 ExecutionException (java.util.concurrent.ExecutionException)2 ExecutionException (org.eclipse.core.commands.ExecutionException)2 IContainerManager (org.eclipse.ecf.core.IContainerManager)2