Class GrpcHeaderInterceptor (2.48.1)

public class GrpcHeaderInterceptor implements ClientInterceptor

An interceptor to handle custom headers.

Package-private for internal usage.

Inheritance

java.lang.Object > GrpcHeaderInterceptor

Implements

io.grpc.ClientInterceptor

Constructors

GrpcHeaderInterceptor(Map<String,String> staticHeaders)

public GrpcHeaderInterceptor(Map<String,String> staticHeaders)
Parameter
Name Description
staticHeaders Map<String,String>

Methods

<ReqT,RespT>interceptCall(MethodDescriptor<ReqT,RespT> method, CallOptions callOptions, Channel next)

public ClientCall<ReqT,RespT> <ReqT,RespT>interceptCall(MethodDescriptor<ReqT,RespT> method, CallOptions callOptions, Channel next)
Parameters
Name Description
method io.grpc.MethodDescriptor<ReqT,RespT>
callOptions io.grpc.CallOptions
next io.grpc.Channel
Returns
Type Description
io.grpc.ClientCall<ReqT,RespT>

getUserAgentHeader()

public String getUserAgentHeader()
Returns
Type Description
String