Class ServerBootstrap
- Since:
- 4.4
-
Method Summary
Modifier and TypeMethodDescriptionfinal ServerBootstrapaddInterceptorFirst(org.apache.http.HttpRequestInterceptor itcp) Adds this protocol interceptor to the head of the protocol processing list.final ServerBootstrapaddInterceptorFirst(org.apache.http.HttpResponseInterceptor itcp) Adds this protocol interceptor to the head of the protocol processing list.final ServerBootstrapaddInterceptorLast(org.apache.http.HttpRequestInterceptor itcp) Adds this protocol interceptor to the tail of the protocol processing list.final ServerBootstrapaddInterceptorLast(org.apache.http.HttpResponseInterceptor itcp) Adds this protocol interceptor to the tail of the protocol processing list.static ServerBootstrapcreate()final ServerBootstrapregisterHandler(String pattern, HttpAsyncRequestHandler<?> handler) Registers the givenHttpAsyncRequestHandleras a handler for URIs matching the given pattern.final ServerBootstrapsetConnectionConfig(org.apache.http.config.ConnectionConfig connectionConfig) Sets connection configuration.final ServerBootstrapsetConnectionFactory(NHttpConnectionFactory<? extends DefaultNHttpServerConnection> connectionFactory) AssignsNHttpConnectionFactoryinstance.final ServerBootstrapsetConnectionReuseStrategy(org.apache.http.ConnectionReuseStrategy connStrategy) AssignsConnectionReuseStrategyinstance.final ServerBootstrapsetExceptionLogger(org.apache.http.ExceptionLogger exceptionLogger) AssignsExceptionLoggerinstance.final ServerBootstrapsetExpectationVerifier(HttpAsyncExpectationVerifier expectationVerifier) AssignsHttpAsyncExpectationVerifierinstance.final ServerBootstrapsetHandlerMapper(HttpAsyncRequestHandlerMapper handlerMapper) AssignsHttpAsyncRequestHandlerMapperinstance.final ServerBootstrapsetHttpProcessor(org.apache.http.protocol.HttpProcessor httpProcessor) AssignsHttpProcessorinstance.final ServerBootstrapsetIOReactorConfig(IOReactorConfig ioReactorConfig) Sets I/O reactor configuration.final ServerBootstrapsetListenerPort(int listenerPort) Sets listener port number.final ServerBootstrapsetLocalAddress(InetAddress localAddress) Assigns local interface for the listener.final ServerBootstrapsetResponseFactory(org.apache.http.HttpResponseFactory responseFactory) AssignsHttpResponseFactoryinstance.final ServerBootstrapsetServerInfo(String serverInfo) AssignsServerresponse header value.final ServerBootstrapsetSslContext(SSLContext sslContext) AssignsSSLContextinstance.setSslSetupHandler(SSLSetupHandler sslSetupHandler) AssignsSSLSetupHandlerinstance.
-
Method Details
-
bootstrap
-
setListenerPort
Sets listener port number. -
setLocalAddress
Assigns local interface for the listener. -
setIOReactorConfig
Sets I/O reactor configuration. -
setConnectionConfig
public final ServerBootstrap setConnectionConfig(org.apache.http.config.ConnectionConfig connectionConfig) Sets connection configuration.Please note this value can be overridden by the
setConnectionFactory(org.apache.http.nio.NHttpConnectionFactory)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
public final ServerBootstrap setConnectionReuseStrategy(org.apache.http.ConnectionReuseStrategy connStrategy) AssignsConnectionReuseStrategyinstance. -
setResponseFactory
public final ServerBootstrap setResponseFactory(org.apache.http.HttpResponseFactory responseFactory) AssignsHttpResponseFactoryinstance. -
setHandlerMapper
AssignsHttpAsyncRequestHandlerMapperinstance. -
registerHandler
Registers the givenHttpAsyncRequestHandleras 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) AssignsHttpAsyncExpectationVerifierinstance. -
setConnectionFactory
public final ServerBootstrap setConnectionFactory(NHttpConnectionFactory<? extends DefaultNHttpServerConnection> connectionFactory) AssignsNHttpConnectionFactoryinstance. -
setSslContext
AssignsSSLContextinstance.Please note this value can be overridden by the
setConnectionFactory(org.apache.http.nio.NHttpConnectionFactory)method. -
setSslSetupHandler
AssignsSSLSetupHandlerinstance.Please note this value can be overridden by the
setConnectionFactory(org.apache.http.nio.NHttpConnectionFactory)method. -
setExceptionLogger
AssignsExceptionLoggerinstance. -
create
-