use of org.eclipse.ecf.remoteservice.IRemoteServiceRegistration in project ecf by eclipse.
the class AbstractRemoteServiceTest method testRegisterService.
public void testRegisterService() throws Exception {
final IRemoteServiceContainerAdapter[] adapters = getRemoteServiceAdapters();
// adapter [0] is the service 'server'
final IRemoteServiceRegistration reg = registerService(adapters[0], IConcatService.class.getName(), createService(), customizeProperties(null), 0);
assertNotNull(reg);
IRemoteServiceID remoteServiceID = reg.getID();
assertNotNull(remoteServiceID);
assertNotNull(remoteServiceID.getContainerID());
Thread.sleep(SLEEPTIME);
}
use of org.eclipse.ecf.remoteservice.IRemoteServiceRegistration in project ecf by eclipse.
the class AbstractDistributionTest method registerRemoteService.
protected IRemoteServiceRegistration registerRemoteService(IRemoteServiceContainerAdapter adapter, String serviceInterface, Object service, Dictionary serviceProperties, int sleepTime) {
final IRemoteServiceRegistration result = adapter.registerRemoteService(new String[] { serviceInterface }, service, serviceProperties);
sleep(sleepTime);
return result;
}
use of org.eclipse.ecf.remoteservice.IRemoteServiceRegistration in project ecf by eclipse.
the class RemoteServiceTest method registerService.
protected IRemoteServiceRegistration registerService(IRemoteServiceContainerAdapter adapter, String serviceInterface, Object service, Dictionary serviceProperties, int sleepTime) {
final IRemoteServiceRegistration result = adapter.registerRemoteService(new String[] { serviceInterface }, service, serviceProperties);
sleep(sleepTime);
return result;
}
use of org.eclipse.ecf.remoteservice.IRemoteServiceRegistration in project ecf by eclipse.
the class RpcRemoteServiceAdapterTest method testGetRemoteServiceID.
public void testGetRemoteServiceID() {
IRemoteServiceRegistration registration = createRpcRegistration(RpcConstants.TEST_ECHO_METHOD);
long containerRelativeID = registration.getID().getContainerRelativeID();
IRemoteServiceID remoteServiceID = getRemoteServiceClientContainerAdapter().getRemoteServiceID(container.getID(), containerRelativeID);
assertEquals(registration.getID(), remoteServiceID);
}
use of org.eclipse.ecf.remoteservice.IRemoteServiceRegistration in project ecf by eclipse.
the class RpcRemoteServiceAdapterTest method testUngetRemoteService.
public void testUngetRemoteService() {
IRemoteServiceRegistration registration = createRpcRegistration(RpcConstants.TEST_ECHO_METHOD);
IRemoteServiceReference reference = registration.getReference();
getRemoteServiceClientContainerAdapter().getRemoteService(reference);
assertTrue(getRemoteServiceClientContainerAdapter().ungetRemoteService(reference));
}
Aggregations