Search in sources :

Example 6 with IRemoteServiceRegistration

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);
}
Also used : IRemoteServiceContainerAdapter(org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter) IRemoteServiceID(org.eclipse.ecf.remoteservice.IRemoteServiceID) IRemoteServiceRegistration(org.eclipse.ecf.remoteservice.IRemoteServiceRegistration)

Example 7 with IRemoteServiceRegistration

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;
}
Also used : IRemoteServiceRegistration(org.eclipse.ecf.remoteservice.IRemoteServiceRegistration)

Example 8 with IRemoteServiceRegistration

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;
}
Also used : IRemoteServiceRegistration(org.eclipse.ecf.remoteservice.IRemoteServiceRegistration)

Example 9 with IRemoteServiceRegistration

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);
}
Also used : IRemoteServiceID(org.eclipse.ecf.remoteservice.IRemoteServiceID) IRemoteServiceRegistration(org.eclipse.ecf.remoteservice.IRemoteServiceRegistration)

Example 10 with IRemoteServiceRegistration

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));
}
Also used : IRemoteServiceReference(org.eclipse.ecf.remoteservice.IRemoteServiceReference) IRemoteServiceRegistration(org.eclipse.ecf.remoteservice.IRemoteServiceRegistration)

Aggregations

IRemoteServiceRegistration (org.eclipse.ecf.remoteservice.IRemoteServiceRegistration)18 IRemoteServiceReference (org.eclipse.ecf.remoteservice.IRemoteServiceReference)8 IRemoteServiceContainerAdapter (org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter)3 IRemoteServiceID (org.eclipse.ecf.remoteservice.IRemoteServiceID)3 Dictionary (java.util.Dictionary)2 IRemoteService (org.eclipse.ecf.remoteservice.IRemoteService)2 Hashtable (java.util.Hashtable)1 TreeMap (java.util.TreeMap)1 IContainer (org.eclipse.ecf.core.IContainer)1 IExtendedRemoteServiceRegistration (org.eclipse.ecf.remoteservice.IExtendedRemoteServiceRegistration)1 IOSGiRemoteServiceContainerAdapter (org.eclipse.ecf.remoteservice.IOSGiRemoteServiceContainerAdapter)1 IRemoteCallable (org.eclipse.ecf.remoteservice.client.IRemoteCallable)1 HttpGetRequestType (org.eclipse.ecf.remoteservice.rest.client.HttpGetRequestType)1