public class ServerBootstrap extends Object
public static ServerBootstrap bootstrap()
public final ServerBootstrap setListenerPort(int listenerPort)
public final ServerBootstrap setLocalAddress(InetAddress localAddress)
public final ServerBootstrap setSocketConfig(SocketConfig socketConfig)
public final ServerBootstrap setConnectionConfig(ConnectionConfig connectionConfig)
Please note this value can be overridden by the setConnectionFactory(
org.apache.http.HttpConnectionFactory) 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(HttpRequestHandlerMapper handlerMapper)
HttpRequestHandlerMapper instance.public final ServerBootstrap registerHandler(String pattern, HttpRequestHandler handler)
HttpRequestHandler as a handler for URIs
matching the given pattern.
Please note this value can be overridden by the setHandlerMapper(
org.apache.http.protocol.HttpRequestHandlerMapper) method.
pattern - the pattern to register the handler for.handler - the handler.public final ServerBootstrap setExpectationVerifier(HttpExpectationVerifier expectationVerifier)
HttpExpectationVerifier instance.public final ServerBootstrap setConnectionFactory(HttpConnectionFactory<? extends DefaultBHttpServerConnection> connectionFactory)
HttpConnectionFactory instance.public final ServerBootstrap setSslSetupHandler(SSLServerSetupHandler sslSetupHandler)
SSLServerSetupHandler instance.public final ServerBootstrap setServerSocketFactory(ServerSocketFactory serverSocketFactory)
ServerSocketFactory instance.public final ServerBootstrap setSslContext(SSLContext sslContext)
SSLContext instance.
Please note this value can be overridden by the setServerSocketFactory(
javax.net.ServerSocketFactory) method.
public final ServerBootstrap setExceptionLogger(ExceptionLogger exceptionLogger)
ExceptionLogger instance.public HttpServer create()
Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.