public class HttpServer<I,O> extends RxServer<HttpServerRequest<I>,HttpServerResponse<O>>
AbstractServer.ServerState
pipelineConfigurator
bootstrap, connectionFactory, errorHandler, eventsSubject, port, serverStateRef
Modifier | Constructor and Description |
---|---|
protected |
HttpServer(io.netty.bootstrap.ServerBootstrap bootstrap,
int port,
PipelineConfigurator<HttpServerRequest<I>,HttpServerResponse<O>> pipelineConfigurator,
io.reactivex.netty.protocol.http.server.HttpConnectionHandler<I,O> connectionHandler) |
protected |
HttpServer(io.netty.bootstrap.ServerBootstrap bootstrap,
int port,
PipelineConfigurator<HttpServerRequest<I>,HttpServerResponse<O>> pipelineConfigurator,
io.reactivex.netty.protocol.http.server.HttpConnectionHandler<I,O> connectionHandler,
io.netty.util.concurrent.EventExecutorGroup requestProcessingExecutor,
long requestContentSubscriptionTimeoutMs) |
|
HttpServer(io.netty.bootstrap.ServerBootstrap bootstrap,
int port,
PipelineConfigurator<HttpServerRequest<I>,HttpServerResponse<O>> pipelineConfigurator,
RequestHandler<I,O> requestHandler) |
|
HttpServer(io.netty.bootstrap.ServerBootstrap bootstrap,
int port,
PipelineConfigurator<HttpServerRequest<I>,HttpServerResponse<O>> pipelineConfigurator,
RequestHandler<I,O> requestHandler,
io.netty.util.concurrent.EventExecutorGroup requestProcessingExecutor) |
Modifier and Type | Method and Description |
---|---|
HttpServer<I,O> |
start() |
HttpServer<I,O> |
withErrorHandler(ErrorHandler errorHandler)
A catch all error handler which gets invoked if any error happens during connection handling by the configured
ConnectionHandler . |
HttpServer<I,O> |
withErrorResponseGenerator(ErrorResponseGenerator<O> responseGenerator) |
getEventsSubject, getServerPort, newChannelInitializer, returnServer, shutdown, startAndWait, subscribe, waitTillShutdown, waitTillShutdown
public HttpServer(io.netty.bootstrap.ServerBootstrap bootstrap, int port, PipelineConfigurator<HttpServerRequest<I>,HttpServerResponse<O>> pipelineConfigurator, RequestHandler<I,O> requestHandler)
public HttpServer(io.netty.bootstrap.ServerBootstrap bootstrap, int port, PipelineConfigurator<HttpServerRequest<I>,HttpServerResponse<O>> pipelineConfigurator, RequestHandler<I,O> requestHandler, io.netty.util.concurrent.EventExecutorGroup requestProcessingExecutor)
protected HttpServer(io.netty.bootstrap.ServerBootstrap bootstrap, int port, PipelineConfigurator<HttpServerRequest<I>,HttpServerResponse<O>> pipelineConfigurator, io.reactivex.netty.protocol.http.server.HttpConnectionHandler<I,O> connectionHandler)
protected HttpServer(io.netty.bootstrap.ServerBootstrap bootstrap, int port, PipelineConfigurator<HttpServerRequest<I>,HttpServerResponse<O>> pipelineConfigurator, io.reactivex.netty.protocol.http.server.HttpConnectionHandler<I,O> connectionHandler, io.netty.util.concurrent.EventExecutorGroup requestProcessingExecutor, long requestContentSubscriptionTimeoutMs)
public HttpServer<I,O> withErrorResponseGenerator(ErrorResponseGenerator<O> responseGenerator)
public HttpServer<I,O> start()
start
in class AbstractServer<HttpServerRequest<I>,HttpServerResponse<O>,io.netty.bootstrap.ServerBootstrap,io.netty.channel.ServerChannel,RxServer<HttpServerRequest<I>,HttpServerResponse<O>>>
public HttpServer<I,O> withErrorHandler(ErrorHandler errorHandler)
AbstractServer
ConnectionHandler
.withErrorHandler
in class AbstractServer<HttpServerRequest<I>,HttpServerResponse<O>,io.netty.bootstrap.ServerBootstrap,io.netty.channel.ServerChannel,RxServer<HttpServerRequest<I>,HttpServerResponse<O>>>
errorHandler
- Error handler to invoke when ConnectionHandler
threw an error.