Package io.servicetalk.grpc.api
Interface GrpcLifecycleObserver.GrpcRequestObserver
- All Superinterfaces:
HttpLifecycleObserver.HttpRequestObserver
- Enclosing interface:
- GrpcLifecycleObserver
public static interface GrpcLifecycleObserver.GrpcRequestObserver
extends HttpLifecycleObserver.HttpRequestObserver
An observer interface that provides visibility into events associated with a single gRPC request.
The request is considered complete when one of the terminal events is invoked. It is guaranteed that only one terminal event will be invoked per request.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonRequestTrailers(HttpHeaders trailers) Callback when request trailers were observed.Methods inherited from interface io.servicetalk.http.api.HttpLifecycleObserver.HttpRequestObserver
onRequestCancel, onRequestComplete, onRequestData, onRequestDataRequested, onRequestError
-
Method Details
-
onRequestTrailers
Callback when request trailers were observed.May be invoked zero times (if no trailers are present in the request) or once after all
request data chunksare observed.gRPC over HTTP2 protocol does not define trailers in the request. This method is not expected to be invoked. However, it might be useful if the server listens to both gRPC and HTTP traffic or receives non-gRPC requests from untrusted peers.
- Specified by:
onRequestTrailersin interfaceHttpLifecycleObserver.HttpRequestObserver- Parameters:
trailers- trailers of the request
-