Search in sources :

Example 1 with SSLGenericServerContainer

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

the class SSLSimpleConcatServer method start.

public void start(int port) throws Exception {
    // Start server
    server = new SSLSimpleGenericServer(HOST, port);
    server.start(PATH, KEEPALIVE);
    SSLGenericServerContainer 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 : SSLGenericServerContainer(org.eclipse.ecf.server.generic.SSLGenericServerContainer) SSLSimpleGenericServer(org.eclipse.ecf.server.generic.SSLSimpleGenericServer) IRemoteServiceContainerAdapter(org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter) IConcatService(org.eclipse.ecf.tests.remoteservice.IConcatService)

Aggregations

IRemoteServiceContainerAdapter (org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter)1 SSLGenericServerContainer (org.eclipse.ecf.server.generic.SSLGenericServerContainer)1 SSLSimpleGenericServer (org.eclipse.ecf.server.generic.SSLSimpleGenericServer)1 IConcatService (org.eclipse.ecf.tests.remoteservice.IConcatService)1