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, HttpRequestHandler handler) Registers the givenHttpRequestHandler
as a handler for URIs matching the given pattern.final ServerBootstrap
setConnectionConfig
(ConnectionConfig connectionConfig) Sets connection configuration.final ServerBootstrap
setConnectionFactory
(HttpConnectionFactory<? extends DefaultBHttpServerConnection> connectionFactory) AssignsHttpConnectionFactory
instance.final ServerBootstrap
setConnectionReuseStrategy
(ConnectionReuseStrategy connStrategy) AssignsConnectionReuseStrategy
instance.final ServerBootstrap
setExceptionLogger
(ExceptionLogger exceptionLogger) AssignsExceptionLogger
instance.final ServerBootstrap
setExpectationVerifier
(HttpExpectationVerifier expectationVerifier) AssignsHttpExpectationVerifier
instance.final ServerBootstrap
setHandlerMapper
(HttpRequestHandlerMapper handlerMapper) AssignsHttpRequestHandlerMapper
instance.final ServerBootstrap
setHttpProcessor
(HttpProcessor httpProcessor) AssignsHttpProcessor
instance.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
setServerSocketFactory
(ServerSocketFactory serverSocketFactory) AssignsServerSocketFactory
instance.final ServerBootstrap
setSocketConfig
(SocketConfig socketConfig) Sets socket configuration.final ServerBootstrap
setSslContext
(SSLContext sslContext) AssignsSSLContext
instance.final ServerBootstrap
setSslSetupHandler
(SSLServerSetupHandler sslSetupHandler) AssignsSSLServerSetupHandler
instance.
-
Method Details
-
bootstrap
-
setListenerPort
Sets listener port number. -
setLocalAddress
Assigns local interface for the listener. -
setSocketConfig
Sets socket configuration. -
setConnectionConfig
Sets connection configuration.Please note this value can be overridden by the
setConnectionFactory(org.apache.http.HttpConnectionFactory)
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
AssignsHttpRequestHandlerMapper
instance. -
registerHandler
Registers the givenHttpRequestHandler
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.- Parameters:
pattern
- the pattern to register the handler for.handler
- the handler.
-
setExpectationVerifier
AssignsHttpExpectationVerifier
instance. -
setConnectionFactory
public final ServerBootstrap setConnectionFactory(HttpConnectionFactory<? extends DefaultBHttpServerConnection> connectionFactory) AssignsHttpConnectionFactory
instance. -
setSslSetupHandler
AssignsSSLServerSetupHandler
instance. -
setServerSocketFactory
AssignsServerSocketFactory
instance. -
setSslContext
AssignsSSLContext
instance.Please note this value can be overridden by the
setServerSocketFactory(javax.net.ServerSocketFactory)
method. -
setExceptionLogger
AssignsExceptionLogger
instance. -
create
-