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, HttpAsyncRequestHandler<?> handler) Registers the givenHttpAsyncRequestHandleras a handler for URIs matching the given pattern.final ServerBootstrapsetConnectionConfig(ConnectionConfig connectionConfig) Sets connection configuration.final ServerBootstrapsetConnectionFactory(NHttpConnectionFactory<? extends DefaultNHttpServerConnection> connectionFactory) AssignsNHttpConnectionFactoryinstance.final ServerBootstrapsetConnectionReuseStrategy(ConnectionReuseStrategy connStrategy) AssignsConnectionReuseStrategyinstance.final ServerBootstrapsetExceptionLogger(ExceptionLogger exceptionLogger) AssignsExceptionLoggerinstance.final ServerBootstrapsetExpectationVerifier(HttpAsyncExpectationVerifier expectationVerifier) AssignsHttpAsyncExpectationVerifierinstance.final ServerBootstrapsetHandlerMapper(HttpAsyncRequestHandlerMapper handlerMapper) AssignsHttpAsyncRequestHandlerMapperinstance.final ServerBootstrapsetHttpProcessor(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(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
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
AssignsConnectionReuseStrategyinstance. -
setResponseFactory
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
-