public class ServerBootstrap extends Object
public static ServerBootstrap bootstrap()
public final ServerBootstrap setListenerPort(int listenerPort)
public final ServerBootstrap setLocalAddress(InetAddress localAddress)
public final ServerBootstrap setIOReactorConfig(IOReactorConfig ioReactorConfig)
public final ServerBootstrap setConnectionConfig(ConnectionConfig connectionConfig)
Please note this value can be overridden by the setConnectionFactory(
org.apache.http.nio.NHttpConnectionFactory) method.
public final ServerBootstrap setHttpProcessor(HttpProcessor httpProcessor)
HttpProcessor instance.public final ServerBootstrap addInterceptorFirst(HttpResponseInterceptor itcp)
Please note this value can be overridden by the setHttpProcessor(
org.apache.http.protocol.HttpProcessor) method.
public final ServerBootstrap addInterceptorLast(HttpResponseInterceptor itcp)
Please note this value can be overridden by the setHttpProcessor(
org.apache.http.protocol.HttpProcessor) method.
public final ServerBootstrap addInterceptorFirst(HttpRequestInterceptor itcp)
Please note this value can be overridden by the setHttpProcessor(
org.apache.http.protocol.HttpProcessor) method.
public final ServerBootstrap addInterceptorLast(HttpRequestInterceptor itcp)
Please note this value can be overridden by the setHttpProcessor(
org.apache.http.protocol.HttpProcessor) method.
public final ServerBootstrap setServerInfo(String serverInfo)
Server response header value.
Please note this value can be overridden by the setHttpProcessor(
org.apache.http.protocol.HttpProcessor) method.
public final ServerBootstrap setConnectionReuseStrategy(ConnectionReuseStrategy connStrategy)
ConnectionReuseStrategy instance.public final ServerBootstrap setResponseFactory(HttpResponseFactory responseFactory)
HttpResponseFactory instance.public final ServerBootstrap setHandlerMapper(HttpAsyncRequestHandlerMapper handlerMapper)
HttpAsyncRequestHandlerMapper instance.public final ServerBootstrap registerHandler(String pattern, HttpAsyncRequestHandler<?> handler)
HttpAsyncRequestHandler
as a handler for URIs matching the given pattern.
Please note this value can be overridden by the setHandlerMapper(
org.apache.http.nio.protocol.HttpAsyncRequestHandlerMapper) )} method.
pattern - the pattern to register the handler for.handler - the handler.public final ServerBootstrap setExpectationVerifier(HttpAsyncExpectationVerifier expectationVerifier)
HttpAsyncExpectationVerifier instance.public final ServerBootstrap setConnectionFactory(NHttpConnectionFactory<? extends DefaultNHttpServerConnection> connectionFactory)
NHttpConnectionFactory instance.public final ServerBootstrap setSslContext(SSLContext sslContext)
SSLContext instance.
Please note this value can be overridden by the setConnectionFactory(
org.apache.http.nio.NHttpConnectionFactory) method.
public ServerBootstrap setSslSetupHandler(SSLSetupHandler sslSetupHandler)
SSLSetupHandler instance.
Please note this value can be overridden by the setConnectionFactory(
org.apache.http.nio.NHttpConnectionFactory) method.
public final ServerBootstrap setExceptionLogger(ExceptionLogger exceptionLogger)
ExceptionLogger instance.public HttpServer create()
Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.