Search in sources :

Example 1 with SimpleGenericServer

use of org.eclipse.ecf.server.generic.SimpleGenericServer in project ecf by eclipse.

the class SimpleConcatServer method start.

public void start(int port) throws Exception {
    // Start server
    server = new SimpleGenericServer(HOST, port);
    server.start(PATH, KEEPALIVE);
    GenericServerContainer serverContainer = server.getServerContainer(0);
    IRemoteServiceContainerAdapter adapter = (IRemoteServiceContainerAdapter) serverContainer.getAdapter(IRemoteServiceContainerAdapter.class);
    Assert.isNotNull(adapter);
    registration = adapter.registerRemoteService(new String[] { IConcatService.class.getName() }, new ConcatService(), null);
    Assert.isNotNull(registration);
    System.out.println("generic server started with id=" + serverContainer.getID());
}
Also used : SimpleGenericServer(org.eclipse.ecf.server.generic.SimpleGenericServer) GenericServerContainer(org.eclipse.ecf.server.generic.GenericServerContainer) IRemoteServiceContainerAdapter(org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter) IConcatService(org.eclipse.ecf.tests.remoteservice.IConcatService)

Example 2 with SimpleGenericServer

use of org.eclipse.ecf.server.generic.SimpleGenericServer in project ecf by eclipse.

the class GenericServerTest method setUp.

protected void setUp() throws Exception {
    super.setUp();
    server = new SimpleGenericServer("localhost", SERVER_PORT);
    server.start(SERVER_PATH, SERVER_KEEPALIVE);
}
Also used : SimpleGenericServer(org.eclipse.ecf.server.generic.SimpleGenericServer)

Aggregations

SimpleGenericServer (org.eclipse.ecf.server.generic.SimpleGenericServer)2 IRemoteServiceContainerAdapter (org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter)1 GenericServerContainer (org.eclipse.ecf.server.generic.GenericServerContainer)1 IConcatService (org.eclipse.ecf.tests.remoteservice.IConcatService)1