Class HeaderAttachingInterceptor<T>
- java.lang.Object
-
- io.axoniq.axonserver.connector.impl.HeaderAttachingInterceptor<T>
-
- Type Parameters:
T- the key and value type of the header this interceptor will attach
- All Implemented Interfaces:
io.grpc.ClientInterceptor
public class HeaderAttachingInterceptor<T> extends Object implements io.grpc.ClientInterceptor
Interceptor around a gRPC request to add header information as metadata to a message.- Since:
- 4.0
- Author:
- Marc Gathier
-
-
Constructor Summary
Constructors Constructor Description HeaderAttachingInterceptor(io.grpc.Metadata.Key<T> header, T value)Constructs aHeaderAttachingInterceptorattaching metadata using the givenheaderas key, paired with the givenvalue
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <REQ,RESP>
io.grpc.ClientCall<REQ,RESP>interceptCall(io.grpc.MethodDescriptor<REQ,RESP> methodDescriptor, io.grpc.CallOptions callOptions, io.grpc.Channel channel)
-
-
-
Constructor Detail
-
HeaderAttachingInterceptor
public HeaderAttachingInterceptor(io.grpc.Metadata.Key<T> header, T value)
Constructs aHeaderAttachingInterceptorattaching metadata using the givenheaderas key, paired with the givenvalue- Parameters:
header- theMetadata.Keyto attach on intercepted messagesvalue- the object of typeTto attach on intercepted messages
-
-