use of org.eclipse.ecf.remoteservice.IRemoteService in project ecf by eclipse.
the class AbstractRemoteServiceTest method testCallAsynch.
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);
}
use of org.eclipse.ecf.remoteservice.IRemoteService in project ecf by eclipse.
the class AbstractRemoteServiceTest method testBadCallSynch.
public void testBadCallSynch() throws Exception {
final IRemoteService service = registerAndGetRemoteService();
if (service == null)
return;
// exist
try {
service.callSync(createRemoteCall("concat1", new Object[] { "first", "second" }));
fail();
} catch (final ECFException e) {
// Exception should occur
}
// concat
try {
service.callSync(createRemoteCall("concat", new Object[] { "first" }));
fail();
} catch (final ECFException e) {
// Exception should occur
}
Thread.sleep(SLEEPTIME);
}
use of org.eclipse.ecf.remoteservice.IRemoteService in project ecf by eclipse.
the class AbstractRemoteServiceTest method testGetProxyNoRemoteServiceProxy.
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);
}
use of org.eclipse.ecf.remoteservice.IRemoteService in project ecf by eclipse.
the class AbstractRemoteServiceTest method testCallSynch.
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")));
Thread.sleep(SLEEPTIME);
}
use of org.eclipse.ecf.remoteservice.IRemoteService in project ecf by eclipse.
the class AbstractRemoteServiceTest method testFireAsynch.
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);
}
Aggregations