Class GrpcHeaderInterceptor (2.34.0)

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
NameDescription
staticHeadersMap<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
NameDescription
methodio.grpc.MethodDescriptor<ReqT,RespT>
callOptionsio.grpc.CallOptions
nextio.grpc.Channel
Returns
TypeDescription
io.grpc.ClientCall<ReqT,RespT>

getUserAgentHeader()

public String getUserAgentHeader()
Returns
TypeDescription
String