Class Http1ClientConfig
java.lang.Object
io.vertx.core.http.Http1ClientConfig
HTTP/1.x client configuration.
- Author:
- Julien Viet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintReturns the maximum HTTP chunk sizeintintintbooleanIs keep alive enabled on the client?booleanIs pipe-lining enabled on the clientsetDecoderInitialBufferSize(int decoderInitialBufferSize) set toinitialBufferSizeHttpDecoderthe initial buffer of the HttpDecoder.setKeepAlive(boolean keepAlive) Set whether keep alive is enabled on the clientsetKeepAliveTimeout(Duration keepAliveTimeout) Set the keep alive timeout for HTTP/1.1 connections.setMaxChunkSize(int maxChunkSize) Set the maximum HTTP chunk sizesetMaxHeaderSize(int maxHeaderSize) Set the maximum length of all headers for HTTP/1.x .setMaxInitialLineLength(int maxInitialLineLength) Set the maximum length of the initial line for HTTP/1.x (e.g.setPipelining(boolean pipelining) Set whether pipe-lining is enabled on the clientsetPipeliningLimit(int limit) Set the limit of pending requests a pipe-lined HTTP/1 connection can send.
-
Constructor Details
-
Http1ClientConfig
public Http1ClientConfig() -
Http1ClientConfig
-
-
Method Details
-
isKeepAlive
public boolean isKeepAlive()Is keep alive enabled on the client?- Returns:
trueif enabled
-
setKeepAlive
Set whether keep alive is enabled on the client- Parameters:
keepAlive-trueif enabled- Returns:
- a reference to this, so the API can be used fluently
-
getKeepAliveTimeout
- Returns:
- the keep alive timeout value in seconds for HTTP/1.x connections
-
setKeepAliveTimeout
Set the keep alive timeout for HTTP/1.1 connections. This value determines how long a connection remains unused in the pool before being evicted and closed. A timeout of zero or
nullmeans there is no timeout.- Parameters:
keepAliveTimeout- the timeout, in seconds- Returns:
- a reference to this, so the API can be used fluently
-
isPipelining
public boolean isPipelining()Is pipe-lining enabled on the client- Returns:
trueif pipe-lining is enabled
-
setPipelining
Set whether pipe-lining is enabled on the client- Parameters:
pipelining-trueif enabled- Returns:
- a reference to this, so the API can be used fluently
-
getPipeliningLimit
public int getPipeliningLimit()- Returns:
- the limit of pending requests a pipe-lined HTTP/1 connection can send
-
setPipeliningLimit
Set the limit of pending requests a pipe-lined HTTP/1 connection can send.- Parameters:
limit- the limit of pending requests- Returns:
- a reference to this, so the API can be used fluently
-
setMaxChunkSize
Set the maximum HTTP chunk size- Parameters:
maxChunkSize- the maximum chunk size- Returns:
- a reference to this, so the API can be used fluently
-
getMaxChunkSize
public int getMaxChunkSize()Returns the maximum HTTP chunk size- Returns:
- the maximum HTTP chunk size
-
getMaxInitialLineLength
public int getMaxInitialLineLength()- Returns:
- the maximum length of the initial line for HTTP/1.x (e.g.
"GET / HTTP/1.0")
-
setMaxInitialLineLength
Set the maximum length of the initial line for HTTP/1.x (e.g."HTTP/1.1 200 OK")- Parameters:
maxInitialLineLength- the new maximum initial length- Returns:
- a reference to this, so the API can be used fluently
-
getMaxHeaderSize
public int getMaxHeaderSize()- Returns:
- Returns the maximum length of all headers for HTTP/1.x
-
setMaxHeaderSize
Set the maximum length of all headers for HTTP/1.x .- Parameters:
maxHeaderSize- the new maximum length- Returns:
- a reference to this, so the API can be used fluently
-
getDecoderInitialBufferSize
public int getDecoderInitialBufferSize()- Returns:
- the initial buffer size for the HTTP decoder
-
setDecoderInitialBufferSize
set toinitialBufferSizeHttpDecoderthe initial buffer of the HttpDecoder.- Parameters:
decoderInitialBufferSize- the initial buffer size- Returns:
- a reference to this, so the API can be used fluently
-