use of org.eclipse.ecf.remoteservice.IRemoteServiceID 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.IRemoteServiceID 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.IRemoteServiceID in project ecf by eclipse.
the class AbstractConcatConsumerTestCase method testGetRemoteServiceIDs.
public void testGetRemoteServiceIDs() throws Exception {
final IRemoteServiceReference[] refs = getRemoteServiceReferences(targetID, getRemoteServiceClass().getName(), getRemoteServiceFilter());
assertTrue(refs != null);
assertTrue(refs.length > 0);
for (int i = 0; i < refs.length; i++) {
IRemoteServiceID rsid = refs[i].getID();
assertNotNull(rsid);
}
}
use of org.eclipse.ecf.remoteservice.IRemoteServiceID in project ecf by eclipse.
the class AbstractConcatConsumerTestCase method testGetRemoteServiceReferenceServiceID.
public void testGetRemoteServiceReferenceServiceID() throws Exception {
final IRemoteServiceReference[] refs = getRemoteServiceReferences(targetID, getRemoteServiceClass().getName(), getRemoteServiceFilter());
assertTrue(refs != null);
assertTrue(refs.length > 0);
for (int i = 0; i < refs.length; i++) {
IRemoteServiceID rsid = refs[i].getID();
Long sid = (Long) refs[i].getProperty(org.eclipse.ecf.remoteservice.Constants.SERVICE_ID);
assertNotNull(sid);
assertTrue(sid.longValue() > -1);
assertTrue(sid.longValue() == rsid.getContainerRelativeID());
}
}
use of org.eclipse.ecf.remoteservice.IRemoteServiceID in project ecf by eclipse.
the class RestRemoteServiceAdapterTest method testGetRemoteServiceID.
public void testGetRemoteServiceID() {
IRemoteServiceRegistration registration = createRestRegistration("resourcePath");
long containerRelativeID = registration.getID().getContainerRelativeID();
IRemoteServiceID remoteServiceID = getRemoteServiceClientContainerAdapter().getRemoteServiceID(container.getID(), containerRelativeID);
assertEquals(registration.getID(), remoteServiceID);
}
Aggregations