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's guaranteed only one terminal event will be invoked per request.

  • Method Details

    • onRequestTrailers

      void onRequestTrailers(HttpHeaders trailers)
      Callback when request trailers were 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 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