Class ServerBootstrap
- Since:
- 4.4
-
Method Summary
Modifier and TypeMethodDescriptionfinal ServerBootstrapAdds this protocol interceptor to the head of the protocol processing list.final ServerBootstrapAdds this protocol interceptor to the head of the protocol processing list.final ServerBootstrapAdds this protocol interceptor to the tail of the protocol processing list.final ServerBootstrapAdds this protocol interceptor to the tail of the protocol processing list.static ServerBootstrapcreate()final ServerBootstrapregisterHandler(String pattern, HttpRequestHandler handler) Registers the givenHttpRequestHandleras a handler for URIs matching the given pattern.final ServerBootstrapsetConnectionConfig(ConnectionConfig connectionConfig) Sets connection configuration.final ServerBootstrapsetConnectionFactory(HttpConnectionFactory<? extends DefaultBHttpServerConnection> connectionFactory) AssignsHttpConnectionFactoryinstance.final ServerBootstrapsetConnectionReuseStrategy(ConnectionReuseStrategy connStrategy) AssignsConnectionReuseStrategyinstance.final ServerBootstrapsetExceptionLogger(ExceptionLogger exceptionLogger) AssignsExceptionLoggerinstance.final ServerBootstrapsetExpectationVerifier(HttpExpectationVerifier expectationVerifier) AssignsHttpExpectationVerifierinstance.final ServerBootstrapsetHandlerMapper(HttpRequestHandlerMapper handlerMapper) AssignsHttpRequestHandlerMapperinstance.final ServerBootstrapsetHttpProcessor(HttpProcessor httpProcessor) AssignsHttpProcessorinstance.final ServerBootstrapsetListenerPort(int listenerPort) Sets listener port number.final ServerBootstrapsetLocalAddress(InetAddress localAddress) Assigns local interface for the listener.final ServerBootstrapsetResponseFactory(HttpResponseFactory responseFactory) AssignsHttpResponseFactoryinstance.final ServerBootstrapsetServerInfo(String serverInfo) AssignsServerresponse header value.final ServerBootstrapsetServerSocketFactory(ServerSocketFactory serverSocketFactory) AssignsServerSocketFactoryinstance.final ServerBootstrapsetSocketConfig(SocketConfig socketConfig) Sets socket configuration.final ServerBootstrapsetSslContext(SSLContext sslContext) AssignsSSLContextinstance.final ServerBootstrapsetSslSetupHandler(SSLServerSetupHandler sslSetupHandler) AssignsSSLServerSetupHandlerinstance.
-
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
AssignsHttpProcessorinstance. -
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
AssignsServerresponse header value.Please note this value can be overridden by the
setHttpProcessor(org.apache.http.protocol.HttpProcessor)method. -
setConnectionReuseStrategy
AssignsConnectionReuseStrategyinstance. -
setResponseFactory
AssignsHttpResponseFactoryinstance. -
setHandlerMapper
AssignsHttpRequestHandlerMapperinstance. -
registerHandler
Registers the givenHttpRequestHandleras 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
AssignsHttpExpectationVerifierinstance. -
setConnectionFactory
public final ServerBootstrap setConnectionFactory(HttpConnectionFactory<? extends DefaultBHttpServerConnection> connectionFactory) AssignsHttpConnectionFactoryinstance. -
setSslSetupHandler
AssignsSSLServerSetupHandlerinstance. -
setServerSocketFactory
AssignsServerSocketFactoryinstance. -
setSslContext
AssignsSSLContextinstance.Please note this value can be overridden by the
setServerSocketFactory(javax.net.ServerSocketFactory)method. -
setExceptionLogger
AssignsExceptionLoggerinstance. -
create
-