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 Details

    • onRequestTrailers

      default void onRequestTrailers(HttpHeaders trailers)
      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 chunks are 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:
      onRequestTrailers in interface HttpLifecycleObserver.HttpRequestObserver
      Parameters:
      trailers - trailers of the request