use of org.eclipse.ecf.remoteservice.IRemoteServiceReference 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.IRemoteServiceReference 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.IRemoteServiceReference 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.IRemoteServiceReference in project ecf by eclipse.
the class AbstractConcatConsumerTestCase method testGetRemoteServiceReferenceObjectClass.
public void testGetRemoteServiceReferenceObjectClass() throws Exception {
String className = getRemoteServiceClass().getName();
final IRemoteServiceReference[] refs = getRemoteServiceReferences(targetID, className, getRemoteServiceFilter());
assertTrue(refs != null);
assertTrue(refs.length > 0);
for (int i = 0; i < refs.length; i++) {
String[] intfClasses = (String[]) refs[i].getProperty(org.eclipse.ecf.remoteservice.Constants.OBJECTCLASS);
List classNames = Arrays.asList(intfClasses);
assertTrue(classNames.contains(className));
}
}
use of org.eclipse.ecf.remoteservice.IRemoteServiceReference 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