Class TimeoutHttpRequesterFilter

java.lang.Object
io.servicetalk.http.utils.TimeoutHttpRequesterFilter
All Implemented Interfaces:
HttpExecutionStrategyInfluencer, StreamingHttpClientFilterFactory, StreamingHttpConnectionFilterFactory, ExecutionStrategyInfluencer<HttpExecutionStrategy>

public final class TimeoutHttpRequesterFilter extends Object implements StreamingHttpClientFilterFactory, StreamingHttpConnectionFilterFactory
A filter to enable timeouts for HTTP requests on the client-side.

The timeout applies either the response metadata (headers) completion or the complete reception of the response payload body and optional trailers.

If no executor is specified at construction an executor from HttpExecutionContext associated with the client or connection will be used. If the HttpExecutionContext.executionStrategy() specifies an HttpExecutionStrategy with offloads then ExecutionContext.executor() will be used and if no offloads are specified then ExecutionContext.ioExecutor() will be used.

The order with which this filter is applied may be highly significant. For example, appending it before a retry filter would have different results than applying it after the retry filter; timeout would apply for all retries vs timeout per retry.