Class ServerBootstrap
- Since:
- 4.4
-
Method Summary
Modifier and TypeMethodDescriptionfinal ServerBootstrap
Adds this protocol interceptor to the head of the protocol processing list.final ServerBootstrap
Adds this protocol interceptor to the head of the protocol processing list.final ServerBootstrap
Adds this protocol interceptor to the tail of the protocol processing list.final ServerBootstrap
Adds this protocol interceptor to the tail of the protocol processing list.static ServerBootstrap
create()
final ServerBootstrap
registerHandler
(String pattern, HttpAsyncRequestHandler<?> handler) Registers the givenHttpAsyncRequestHandler
as a handler for URIs matching the given pattern.final ServerBootstrap
setConnectionConfig
(ConnectionConfig connectionConfig) Sets connection configuration.final ServerBootstrap
setConnectionFactory
(NHttpConnectionFactory<? extends DefaultNHttpServerConnection> connectionFactory) AssignsNHttpConnectionFactory
instance.final ServerBootstrap
setConnectionReuseStrategy
(ConnectionReuseStrategy connStrategy) AssignsConnectionReuseStrategy
instance.final ServerBootstrap
setExceptionLogger
(ExceptionLogger exceptionLogger) AssignsExceptionLogger
instance.final ServerBootstrap
setExpectationVerifier
(HttpAsyncExpectationVerifier expectationVerifier) AssignsHttpAsyncExpectationVerifier
instance.final ServerBootstrap
setHandlerMapper
(HttpAsyncRequestHandlerMapper handlerMapper) AssignsHttpAsyncRequestHandlerMapper
instance.final ServerBootstrap
setHttpProcessor
(HttpProcessor httpProcessor) AssignsHttpProcessor
instance.final ServerBootstrap
setIOReactorConfig
(IOReactorConfig ioReactorConfig) Sets I/O reactor configuration.final ServerBootstrap
setListenerPort
(int listenerPort) Sets listener port number.final ServerBootstrap
setLocalAddress
(InetAddress localAddress) Assigns local interface for the listener.final ServerBootstrap
setResponseFactory
(HttpResponseFactory responseFactory) AssignsHttpResponseFactory
instance.final ServerBootstrap
setServerInfo
(String serverInfo) AssignsServer
response header value.final ServerBootstrap
setSslContext
(SSLContext sslContext) AssignsSSLContext
instance.setSslSetupHandler
(SSLSetupHandler sslSetupHandler) AssignsSSLSetupHandler
instance.
-
Method Details
-
bootstrap
-
setListenerPort
Sets listener port number. -
setLocalAddress
Assigns local interface for the listener. -
setIOReactorConfig
Sets I/O reactor configuration. -
setConnectionConfig
Sets connection configuration.Please note this value can be overridden by the
setConnectionFactory(org.apache.http.nio.NHttpConnectionFactory)
method. -
setHttpProcessor
AssignsHttpProcessor
instance. -
addInterceptorFirst
Adds this protocol interceptor to the head of the protocol processing list.Please note this value can be overridden by the
setHttpProcessor(org.apache.http.protocol.HttpProcessor)
method. -
addInterceptorLast
Adds this protocol interceptor to the tail of the protocol processing list.Please note this value can be overridden by the
setHttpProcessor(org.apache.http.protocol.HttpProcessor)
method. -
addInterceptorFirst
Adds this protocol interceptor to the head of the protocol processing list.Please note this value can be overridden by the
setHttpProcessor(org.apache.http.protocol.HttpProcessor)
method. -
addInterceptorLast
Adds this protocol interceptor to the tail of the protocol processing list.Please note this value can be overridden by the
setHttpProcessor(org.apache.http.protocol.HttpProcessor)
method. -
setServerInfo
AssignsServer
response header value.Please note this value can be overridden by the
setHttpProcessor(org.apache.http.protocol.HttpProcessor)
method. -
setConnectionReuseStrategy
AssignsConnectionReuseStrategy
instance. -
setResponseFactory
AssignsHttpResponseFactory
instance. -
setHandlerMapper
AssignsHttpAsyncRequestHandlerMapper
instance. -
registerHandler
Registers the givenHttpAsyncRequestHandler
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.- Parameters:
pattern
- the pattern to register the handler for.handler
- the handler.
-
setExpectationVerifier
public final ServerBootstrap setExpectationVerifier(HttpAsyncExpectationVerifier expectationVerifier) AssignsHttpAsyncExpectationVerifier
instance. -
setConnectionFactory
public final ServerBootstrap setConnectionFactory(NHttpConnectionFactory<? extends DefaultNHttpServerConnection> connectionFactory) AssignsNHttpConnectionFactory
instance. -
setSslContext
AssignsSSLContext
instance.Please note this value can be overridden by the
setConnectionFactory(org.apache.http.nio.NHttpConnectionFactory)
method. -
setSslSetupHandler
AssignsSSLSetupHandler
instance.Please note this value can be overridden by the
setConnectionFactory(org.apache.http.nio.NHttpConnectionFactory)
method. -
setExceptionLogger
AssignsExceptionLogger
instance. -
create
-