use of org.eclipse.ecf.remoteservice.IRemoteServiceRegistration in project ecf by eclipse.
the class RestContainerTest method testRegisterRestService.
public void testRegisterRestService() throws Exception {
IContainer container = createRestContainer(RestConstants.TEST_DE_TARGET);
Dictionary properties = new Hashtable();
properties.put("user", "null");
IRemoteCallable callable = RestCallableFactory.createCallable("methodName", "resourcePath", null, new HttpGetRequestType());
IRemoteServiceRegistration registration = registerCallable(container, callable, properties);
assertNotNull(registration);
}
use of org.eclipse.ecf.remoteservice.IRemoteServiceRegistration in project ecf by eclipse.
the class RestRemoteServiceAdapterTest method testGetRemoteServiceReference.
public void testGetRemoteServiceReference() {
IRemoteServiceRegistration registration = createRestRegistration("resourcePath");
IRemoteServiceReference remoteServiceReference = getRemoteServiceClientContainerAdapter().getRemoteServiceReference(registration.getID());
assertEquals(registration.getReference(), remoteServiceReference);
}
use of org.eclipse.ecf.remoteservice.IRemoteServiceRegistration in project ecf by eclipse.
the class RestRemoteServiceAdapterTest method testUngetRemoteService.
public void testUngetRemoteService() {
IRemoteServiceRegistration registration = createRestRegistration("resourcePath");
IRemoteServiceReference reference = registration.getReference();
getRemoteServiceClientContainerAdapter().getRemoteService(reference);
assertTrue(getRemoteServiceClientContainerAdapter().ungetRemoteService(reference));
}
use of org.eclipse.ecf.remoteservice.IRemoteServiceRegistration in project ecf by eclipse.
the class RpcRemoteServiceAdapterTest method testGetRemoteService.
public void testGetRemoteService() {
IRemoteServiceRegistration registration = createRpcRegistration(RpcConstants.TEST_ECHO_METHOD);
IRemoteServiceReference reference = registration.getReference();
assertNotNull(reference);
IRemoteService remoteService = getRemoteServiceClientContainerAdapter().getRemoteService(reference);
assertNotNull(remoteService);
}
use of org.eclipse.ecf.remoteservice.IRemoteServiceRegistration in project ecf by eclipse.
the class AbstractLocalRemoteServiceTest method testGetLocalRemoteServiceReferences.
public void testGetLocalRemoteServiceReferences() throws Exception {
// First register some service locally
IRemoteServiceRegistration registration = containerAdapter.registerRemoteService(new String[] { IConcatService.class.getName() }, createConcatService(), null);
// Now lookup all references
IRemoteServiceReference[] allRefs = containerAdapter.getAllRemoteServiceReferences(IConcatService.class.getName(), null);
assertNotNull(allRefs);
assertTrue(allRefs.length == 1);
// Unregister
registration.unregister();
}
Aggregations