public class ServerBootstrap
extends java.lang.Object
| Modifier and Type | Method | Description |
|---|---|---|
ServerBootstrap |
addInterceptorFirst(org.apache.http.HttpRequestInterceptor itcp) |
Adds this protocol interceptor to the head of the protocol processing list.
|
ServerBootstrap |
addInterceptorFirst(org.apache.http.HttpResponseInterceptor itcp) |
Adds this protocol interceptor to the head of the protocol processing list.
|
ServerBootstrap |
addInterceptorLast(org.apache.http.HttpRequestInterceptor itcp) |
Adds this protocol interceptor to the tail of the protocol processing list.
|
ServerBootstrap |
addInterceptorLast(org.apache.http.HttpResponseInterceptor itcp) |
Adds this protocol interceptor to the tail of the protocol processing list.
|
static ServerBootstrap |
bootstrap() |
|
HttpServer |
create() |
|
ServerBootstrap |
registerHandler(java.lang.String pattern,
HttpAsyncRequestHandler<?> handler) |
Registers the given
HttpAsyncRequestHandler
as a handler for URIs matching the given pattern. |
ServerBootstrap |
setConnectionConfig(org.apache.http.config.ConnectionConfig connectionConfig) |
Sets connection configuration.
|
ServerBootstrap |
setConnectionFactory(NHttpConnectionFactory<? extends DefaultNHttpServerConnection> connectionFactory) |
Assigns
NHttpConnectionFactory instance. |
ServerBootstrap |
setConnectionReuseStrategy(org.apache.http.ConnectionReuseStrategy connStrategy) |
Assigns
ConnectionReuseStrategy instance. |
ServerBootstrap |
setExceptionLogger(org.apache.http.ExceptionLogger exceptionLogger) |
Assigns
ExceptionLogger instance. |
ServerBootstrap |
setExpectationVerifier(HttpAsyncExpectationVerifier expectationVerifier) |
Assigns
HttpAsyncExpectationVerifier instance. |
ServerBootstrap |
setHandlerMapper(HttpAsyncRequestHandlerMapper handlerMapper) |
Assigns
HttpAsyncRequestHandlerMapper instance. |
ServerBootstrap |
setHttpProcessor(org.apache.http.protocol.HttpProcessor httpProcessor) |
Assigns
HttpProcessor instance. |
ServerBootstrap |
setIOReactorConfig(IOReactorConfig ioReactorConfig) |
Sets I/O reactor configuration.
|
ServerBootstrap |
setListenerPort(int listenerPort) |
Sets listener port number.
|
ServerBootstrap |
setLocalAddress(java.net.InetAddress localAddress) |
Assigns local interface for the listener.
|
ServerBootstrap |
setResponseFactory(org.apache.http.HttpResponseFactory responseFactory) |
Assigns
HttpResponseFactory instance. |
ServerBootstrap |
setServerInfo(java.lang.String serverInfo) |
Assigns
Server response header value. |
ServerBootstrap |
setSslContext(javax.net.ssl.SSLContext sslContext) |
Assigns
SSLContext instance. |
ServerBootstrap |
setSslSetupHandler(SSLSetupHandler sslSetupHandler) |
Assigns
SSLSetupHandler instance. |
public static ServerBootstrap bootstrap()
public final ServerBootstrap setListenerPort(int listenerPort)
public final ServerBootstrap setLocalAddress(java.net.InetAddress localAddress)
public final ServerBootstrap setIOReactorConfig(IOReactorConfig ioReactorConfig)
public final ServerBootstrap setConnectionConfig(org.apache.http.config.ConnectionConfig connectionConfig)
Please note this value can be overridden by the setConnectionFactory(
org.apache.http.nio.NHttpConnectionFactory) method.
public final ServerBootstrap setHttpProcessor(org.apache.http.protocol.HttpProcessor httpProcessor)
HttpProcessor instance.public final ServerBootstrap addInterceptorFirst(org.apache.http.HttpResponseInterceptor itcp)
Please note this value can be overridden by the setHttpProcessor(
org.apache.http.protocol.HttpProcessor) method.
public final ServerBootstrap addInterceptorLast(org.apache.http.HttpResponseInterceptor itcp)
Please note this value can be overridden by the setHttpProcessor(
org.apache.http.protocol.HttpProcessor) method.
public final ServerBootstrap addInterceptorFirst(org.apache.http.HttpRequestInterceptor itcp)
Please note this value can be overridden by the setHttpProcessor(
org.apache.http.protocol.HttpProcessor) method.
public final ServerBootstrap addInterceptorLast(org.apache.http.HttpRequestInterceptor itcp)
Please note this value can be overridden by the setHttpProcessor(
org.apache.http.protocol.HttpProcessor) method.
public final ServerBootstrap setServerInfo(java.lang.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(org.apache.http.ConnectionReuseStrategy connStrategy)
ConnectionReuseStrategy instance.public final ServerBootstrap setResponseFactory(org.apache.http.HttpResponseFactory responseFactory)
HttpResponseFactory instance.public final ServerBootstrap setHandlerMapper(HttpAsyncRequestHandlerMapper handlerMapper)
HttpAsyncRequestHandlerMapper instance.public final ServerBootstrap registerHandler(java.lang.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(javax.net.ssl.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(org.apache.http.ExceptionLogger exceptionLogger)
ExceptionLogger instance.public HttpServer create()