Class ApacheHttpClientBuilder
java.lang.Object
dev.langchain4j.http.client.apache.ApacheHttpClientBuilder
- All Implemented Interfaces:
HttpClientBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()connectTimeout(Duration connectTimeout) org.apache.hc.client5.http.impl.async.HttpAsyncClientBuilderhttpAsyncClientBuilder(org.apache.hc.client5.http.impl.async.HttpAsyncClientBuilder httpAsyncClientBuilder) org.apache.hc.client5.http.impl.classic.HttpClientBuilderhttpClientBuilder(org.apache.hc.client5.http.impl.classic.HttpClientBuilder httpClientBuilder) readTimeout(Duration readTimeout) streamingBufferSize(Integer streamingBufferSize) Sets the size of the bounded back-pressure buffer used by the streaming (stream) path.
-
Constructor Details
-
ApacheHttpClientBuilder
public ApacheHttpClientBuilder()
-
-
Method Details
-
httpClientBuilder
public org.apache.hc.client5.http.impl.classic.HttpClientBuilder httpClientBuilder() -
httpClientBuilder
public ApacheHttpClientBuilder httpClientBuilder(org.apache.hc.client5.http.impl.classic.HttpClientBuilder httpClientBuilder) -
httpAsyncClientBuilder
public org.apache.hc.client5.http.impl.async.HttpAsyncClientBuilder httpAsyncClientBuilder() -
httpAsyncClientBuilder
public ApacheHttpClientBuilder httpAsyncClientBuilder(org.apache.hc.client5.http.impl.async.HttpAsyncClientBuilder httpAsyncClientBuilder) -
connectTimeout
- Specified by:
connectTimeoutin interfaceHttpClientBuilder
-
connectTimeout
- Specified by:
connectTimeoutin interfaceHttpClientBuilder
-
readTimeout
- Specified by:
readTimeoutin interfaceHttpClientBuilder
-
readTimeout
- Specified by:
readTimeoutin interfaceHttpClientBuilder
-
streamingBufferSize
- Returns:
- the bounded back-pressure buffer size used by
stream(...), ornullfor the default. - Since:
- 1.20.0
-
streamingBufferSize
Sets the size of the bounded back-pressure buffer used by the streaming (stream) path. Server-sent events are relayed to the subscriber through this buffer; if the subscriber consumes slower than the server produces and the buffer overflows, the stream terminates with an error.The default is 16384.
- Parameters:
streamingBufferSize- the buffer size; must be greater than zero- Returns:
- the builder instance
- Since:
- 1.20.0
-
build
- Specified by:
buildin interfaceHttpClientBuilder
-