Class ContextInjectingInterceptor

java.lang.Object
io.camunda.zeebe.gateway.interceptors.impl.ContextInjectingInterceptor
All Implemented Interfaces:
io.grpc.ServerInterceptor

public final class ContextInjectingInterceptor extends Object implements io.grpc.ServerInterceptor
An interceptor implementation which injects common context for further interceptors. It's expected to be one of the top level interceptors. This is for context objects which are the same and shared by all interceptors, as opposed to the DecoratedInterceptor which injects context information specific to the wrapped interceptor.

This interceptor will inject the following in every call's context:

  • InterceptorUtil#getQueryApi() => returns a query API usable by the interceptors
  • Constructor Details

    • ContextInjectingInterceptor

      public ContextInjectingInterceptor(QueryApi queryApi)
  • Method Details

    • interceptCall

      public <ReqT, RespT> io.grpc.ServerCall.Listener<ReqT> interceptCall(io.grpc.ServerCall<ReqT,RespT> call, io.grpc.Metadata headers, io.grpc.ServerCallHandler<ReqT,RespT> next)
      Specified by:
      interceptCall in interface io.grpc.ServerInterceptor