Search in sources :

Example 1 with HttpNettyServerBuilder

use of com.linkedin.r2.transport.http.server.HttpNettyServerBuilder in project rest.li by linkedin.

the class Https1NettyServerProvider method createServer.

@Override
public Server createServer(FilterChain filters, int port, TransportDispatcher dispatcher) throws Exception {
    Server httpServer = new Http1NettyServerProvider().createServer(filters, SslContextUtil.getHttpPortFromHttps(port));
    Server httpsServer = new HttpNettyServerBuilder().port(port).filters(filters).transportDispatcher(dispatcher).sslContext(SslContextUtil.getContext()).build();
    // start both an http and https server
    return new HttpAndHttpsServer(httpServer, httpsServer);
}
Also used : Server(com.linkedin.r2.transport.common.Server) RestEchoServer(com.linkedin.r2.sample.echo.rest.RestEchoServer) HttpNettyServerBuilder(com.linkedin.r2.transport.http.server.HttpNettyServerBuilder)

Aggregations

RestEchoServer (com.linkedin.r2.sample.echo.rest.RestEchoServer)1 Server (com.linkedin.r2.transport.common.Server)1 HttpNettyServerBuilder (com.linkedin.r2.transport.http.server.HttpNettyServerBuilder)1