Class GrpcHeaderInterceptor

  • All Implemented Interfaces:
    io.grpc.ClientInterceptor

    @InternalApi
    public class GrpcHeaderInterceptor
    extends java.lang.Object
    implements io.grpc.ClientInterceptor
    An interceptor to handle custom headers.

    Package-private for internal usage.

    • Constructor Summary

      Constructors 
      Constructor Description
      GrpcHeaderInterceptor​(java.util.Map<java.lang.String,​java.lang.String> staticHeaders)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getUserAgentHeader()  
      <ReqT,​RespT>
      io.grpc.ClientCall<ReqT,​RespT>
      interceptCall​(io.grpc.MethodDescriptor<ReqT,​RespT> method, io.grpc.CallOptions callOptions, io.grpc.Channel next)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GrpcHeaderInterceptor

        public GrpcHeaderInterceptor​(java.util.Map<java.lang.String,​java.lang.String> staticHeaders)
    • Method Detail

      • interceptCall

        public <ReqT,​RespT> io.grpc.ClientCall<ReqT,​RespT> interceptCall​(io.grpc.MethodDescriptor<ReqT,​RespT> method,
                                                                                     io.grpc.CallOptions callOptions,
                                                                                     io.grpc.Channel next)
        Specified by:
        interceptCall in interface io.grpc.ClientInterceptor
      • getUserAgentHeader

        public java.lang.String getUserAgentHeader()