public final class GrpcLifecycleObserverRequesterFilter
extends HttpLifecycleObserverRequesterFilter
The result of the observed behavior will depend on the position of this filter in the execution chain.
This filter is recommended to be appended as the first
client filter using
GrpcClientBuilder.initializeHttp(GrpcClientBuilder.HttpInitializer) to account for all work done by other
filters. It can be appended at another position, considering the following:
request context, AsyncContext, MDC, or alters
HttpRequestMetaData if that information has to be available for GrpcLifecycleObserver.GrpcExchangeObserver.RetryingHttpRequesterFilter if each retry attempt should be observed as an independent
exchange.connection filter if no user-defined RetryingHttpRequesterFilter is appended manually but the default
auto-retries should be observed as an independent exchange.connection
filter if only network interactions should be observed without accounting for work of any other filters.TimeoutHttpRequesterFilter (or GrpcFilters.newGrpcDeadlineClientFilterFactory()) if the
timeout event should be observed as cancellation instead of an
error.response context or alters
HttpResponseMetaData if that information has to be available for GrpcLifecycleObserver.GrpcExchangeObserver.HttpResponseMetaData into an exception or
throws an exception during response payload body
transformation if that exception has to be observed by GrpcLifecycleObserver.GrpcExchangeObserver.SingleAddressHttpClientBuilder.appendClientFilter(Predicate, StreamingHttpClientFilterFactory) or
SingleAddressHttpClientBuilder.appendConnectionFilter(Predicate, StreamingHttpConnectionFilterFactory) if
the observer should be applied conditionally.| Constructor and Description |
|---|
GrpcLifecycleObserverRequesterFilter(GrpcLifecycleObserver observer)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
HttpExecutionStrategy |
influenceStrategy(HttpExecutionStrategy arg0) |
HttpExecutionStrategy |
requiredOffloads() |
public GrpcLifecycleObserverRequesterFilter(GrpcLifecycleObserver observer)
observer - The observer implementation that consumes gRPC lifecycle events.public final HttpExecutionStrategy requiredOffloads()
requiredOffloads in interface HttpExecutionStrategyInfluencerrequiredOffloads in interface ExecutionStrategyInfluencer<HttpExecutionStrategy>public final HttpExecutionStrategy influenceStrategy(HttpExecutionStrategy arg0)
influenceStrategy in interface HttpExecutionStrategyInfluencer