Class NettyConnectorProvider.Config
java.lang.Object
org.glassfish.jersey.client.innate.ConnectorConfiguration<N>
org.glassfish.jersey.netty.connector.NettyConnectorProvider.Config
- Enclosing class:
- NettyConnectorProvider
public static final class NettyConnectorProvider.Config
extends org.glassfish.jersey.client.innate.ConnectorConfiguration<N>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.glassfish.jersey.client.innate.ConnectorConfiguration
org.glassfish.jersey.client.innate.ConnectorConfiguration.NullableRef<T extends Object>, org.glassfish.jersey.client.innate.ConnectorConfiguration.PrefixedConfiguration, org.glassfish.jersey.client.innate.ConnectorConfiguration.Read<CC extends org.glassfish.jersey.client.innate.ConnectorConfiguration<CC> & org.glassfish.jersey.client.innate.ConnectorConfiguration.Read<CC>> -
Field Summary
Fields inherited from class org.glassfish.jersey.client.innate.ConnectorConfiguration
connectTimeout, expect100Continue, expect100continueThreshold, followRedirects, prefix, proxyPassword, proxyUri, proxyUserName, readTimeout, requestEntityProcessing, sniHostname, sslContextSupplier, threadPoolSize -
Method Summary
Modifier and TypeMethodDescriptionbuild()connectionController(NettyConnectionController controller) Set the connection pooling controller for the Netty Connector.enableLoggingHandler(boolean enable) Enable or disable the Netty logging byLoggingHandler(Level.DEBUG).enableSslHostnameVerification(boolean enable) Enable or disable the endpoint identification algorithm to HTTPS.expect100ContinueTimeout(int millis) This setting determines waiting time in milliseconds for 100-Continue response when 100-Continue is sent by the client.filterHeadersForProxy(boolean filter) Filter the HTTP headers for requests (CONNECT) towards the proxy except for PROXY-prefixed and HOST headers whentrue.idleConnectionPruneTimeout(int seconds) This property determines the number of seconds the idle connections are kept in the pool before pruned.initialHttpHeaderLineLength(int length) Set the maximum length of the first line of the HTTP header.maxChunkSize(int size) Set the maximum chunk size for the Netty connector.maxConnectionsPerDestination(int maxCount) This setting determines the maximum number of idle connections that will be simultaneously kept alive, per destination.maxHeaderSize(int size) Set the maximum header size in bytes for the HTTP headers processed by Netty.maxRedirects(int max) Set the maximum number of redirects to prevent infinite redirect loop.maxTotalConnections(int max) Set the maximum number of idle connections that will be simultaneously kept alive.preserveMethodOnRedirect(boolean preserve) Set the preservation of methods during HTTP redirect.redirectController(NettyHttpRedirectController controller) Set the Netty Connector HTTP redirect controller.protected NettyConnectorProvider.Configself()Methods inherited from class org.glassfish.jersey.client.innate.ConnectorConfiguration
asyncThreadPoolSize, connectTimeout, expect100Continue, expect100ContinueThreshold, followRedirects, prefix, proxy, proxyPassword, proxyUri, proxyUri, proxyUserName, readTimeout, requestEntityProcessing, sniHostName, sslContextSupplier
-
Method Details
-
build
-
connectionController
Set the connection pooling controller for the Netty Connector.- Parameters:
controller- the connection pooling controller.- Returns:
- updated configuration.
-
expect100ContinueTimeout
This setting determines waiting time in milliseconds for 100-Continue response when 100-Continue is sent by the client. The propertyNettyClientProperties.EXPECT_100_CONTINUE_TIMEOUThas precedence over this setting.- Parameters:
millis- the timeout for 100-Continue response.- Returns:
- updated configuration.
-
enableSslHostnameVerification
Enable or disable the endpoint identification algorithm to HTTPS. The propertyNettyClientProperties.ENABLE_SSL_HOSTNAME_VERIFICATIONtakes precedence over this setting.- Parameters:
enable- enable or disable the hostname verification.- Returns:
- updated configuration.
-
enableLoggingHandler
Enable or disable the Netty logging byLoggingHandler(Level.DEBUG). Disabled by default. The propertyNettyClientProperties.LOGGING_ENABLEDtakes precedence over this setting.- Parameters:
enable- to enable or disable.- Returns:
- updated configuration.
-
filterHeadersForProxy
Filter the HTTP headers for requests (CONNECT) towards the proxy except for PROXY-prefixed and HOST headers whentrue. The propertyNettyClientProperties.FILTER_HEADERS_FOR_PROXYhas precedence over this setting.- Parameters:
filter- to filter or not. The default istrue.- Returns:
- updated configuration.
-
idleConnectionPruneTimeout
This property determines the number of seconds the idle connections are kept in the pool before pruned. The default is 60. Specify 0 to disable. The propertyNettyClientProperties.IDLE_CONNECTION_PRUNE_TIMEOUThas precedence over this setting.- Parameters:
seconds- the timeout in seconds.- Returns:
- updated configuration.
-
initialHttpHeaderLineLength
Set the maximum length of the first line of the HTTP header. The propertyNettyClientProperties.MAX_INITIAL_LINE_LENGTHhas precedence over this setting.- Parameters:
length- the length of the first line of the HTTP header.- Returns:
- updated configuration.
-
maxChunkSize
Set the maximum chunk size for the Netty connector. The propertyNettyClientProperties.MAX_CHUNK_SIZEhas precedence over this setting.- Parameters:
size- the new size of chunks.- Returns:
- updated configuration.
-
maxConnectionsPerDestination
This setting determines the maximum number of idle connections that will be simultaneously kept alive, per destination. The default is 5. The propertyNettyClientProperties.MAX_CONNECTIONStakes precedence over this setting.- Parameters:
maxCount- maximum number of idle connections per destination.- Returns:
- updated configuration.
-
maxHeaderSize
Set the maximum header size in bytes for the HTTP headers processed by Netty. The propertyNettyClientProperties.MAX_HEADER_SIZEhas precedence over this setting.- Parameters:
size- the new maximum header size.- Returns:
- updated configuration.
-
maxRedirects
Set the maximum number of redirects to prevent infinite redirect loop. The default is 5. The propertyNettyClientProperties.MAX_REDIRECTShas precedence over this setting.- Parameters:
max- the maximum number of redirects.- Returns:
- updated configuration.
-
maxTotalConnections
Set the maximum number of idle connections that will be simultaneously kept alive. The propertyNettyClientProperties.MAX_CONNECTIONS_TOTALhas precedence over this setting.- Parameters:
max- the maximum number of idle connections.- Returns:
- updated configuration.
-
preserveMethodOnRedirect
Set the preservation of methods during HTTP redirect. By default, the HTTP POST request are not transformed into HTTP GET for status 301 & 302. The propertyNettyClientProperties.PRESERVE_METHOD_ON_REDIRECThas precedence over this setting.- Parameters:
preserve- to preserve or not to preserve.- Returns:
- updated configuration.
-
redirectController
Set the Netty Connector HTTP redirect controller. The propertyNettyClientProperties.HTTP_REDIRECT_CONTROLLERhas precedence over this setting.- Parameters:
controller- the HTTP redirect controller.- Returns:
- updated configuration.
-
self
- Overrides:
selfin classorg.glassfish.jersey.client.innate.ConnectorConfiguration<N extends org.glassfish.jersey.netty.connector.NettyConnectorConfiguration<N>>
-