use of org.eclipse.ecf.remoteservice.IRemoteService in project ecf by eclipse.
the class AbstractRemoteServiceTest method testGetService.
public void testGetService() throws Exception {
final IRemoteService service = registerAndGetRemoteService();
assertNotNull(service);
Thread.sleep(SLEEPTIME);
}
use of org.eclipse.ecf.remoteservice.IRemoteService in project ecf by eclipse.
the class AbstractRemoteServiceTest method testGetProxy.
public void testGetProxy() throws Exception {
final IRemoteService service = registerAndGetRemoteService();
assertNotNull(service);
Object proxy = service.getProxy();
assertTrue(proxy instanceof IRemoteServiceProxy);
Thread.sleep(SLEEPTIME);
}
use of org.eclipse.ecf.remoteservice.IRemoteService in project ecf by eclipse.
the class SimpleTest method testSimpleClientAndServerWithCallAsyncListener.
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();
}
}
});
Thread.sleep(1000);
assertNotNull(result);
assertTrue(result.equals(TEST_STRING_2 + TEST_STRING_1));
}
use of org.eclipse.ecf.remoteservice.IRemoteService in project ecf by eclipse.
the class SimpleTest method testSimpleClientAndServerWithFireAsync.
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);
}
use of org.eclipse.ecf.remoteservice.IRemoteService in project ecf by eclipse.
the class SimpleTest method testSimpleClientAndServerWithFuture.
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));
}
Aggregations