open class Netty4ClientHttpRequestFactory : ClientHttpRequestFactory, AsyncClientHttpRequestFactory, InitializingBean, DisposableBean
org.springframework.http.client.ClientHttpRequestFactory implementation that uses Netty 4 to create requests.
Allows to use a pre-configured EventLoopGroup instance: useful for sharing across multiple clients.
Note that this implementation consistently closes the HTTP connection on each request.
Author
Arjen Poutsma
Author
Rossen Stoyanchev
Author
Brian Clozel
Author
Mark Paluch
Since
4.1.2
Netty4ClientHttpRequestFactory()
Create a new Netty4ClientHttpRequestFactory(eventLoopGroup: EventLoopGroup)
Create a new NOTE: the given group will not be shutdown by this factory; doing so becomes the responsibility of the caller. |
static val DEFAULT_MAX_RESPONSE_SIZE: Int
The default maximum response size. |
open fun afterPropertiesSet(): Unit |
|
open fun createAsyncRequest(uri: URI, httpMethod: HttpMethod): AsyncClientHttpRequest |
|
open fun createRequest(uri: URI, httpMethod: HttpMethod): ClientHttpRequest |
|
open fun destroy(): Unit |
|
open fun setConnectTimeout(connectTimeout: Int): Unit
Set the underlying connect timeout (in milliseconds). A timeout value of 0 specifies an infinite timeout. |
|
open fun setMaxResponseSize(maxResponseSize: Int): Unit
Set the default maximum response size. By default this is set to |
|
open fun setReadTimeout(readTimeout: Int): Unit
Set the underlying URLConnection's read timeout (in milliseconds). A timeout value of 0 specifies an infinite timeout. |
|
open fun setSslContext(sslContext: SslContext): Unit
Set the SSL context. When configured it is used to create and insert an io.netty.handler.ssl.SslHandler in the channel pipeline. A default client SslContext is configured if none has been provided. |