Interface GrpcEntryPoint.Interceptor
- Enclosing class:
GrpcEntryPoint
public static interface GrpcEntryPoint.Interceptor
Interceptor of a gRPC entry point.
This interceptor has direct access to
ServerCall, Metadata, and metadata of the
invoked endpoint.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInvocation chain for a gRPC entry point. -
Method Summary
Modifier and TypeMethodDescription<ReqT,RespT>
io.grpc.ServerCall.Listener<ReqT> intercept(InterceptionContext interceptionContext, GrpcEntryPoint.Interceptor.Chain<ReqT, RespT> chain, io.grpc.ServerCall<ReqT, RespT> call, io.grpc.Metadata headers) Method to implement interceptor logic.
-
Method Details
-
intercept
<ReqT,RespT> io.grpc.ServerCall.Listener<ReqT> intercept(InterceptionContext interceptionContext, GrpcEntryPoint.Interceptor.Chain<ReqT, RespT> chain, io.grpc.ServerCall<ReqT, throws ExceptionRespT> call, io.grpc.Metadata headers) Method to implement interceptor logic.- Type Parameters:
ReqT- request typeRespT- response type- Parameters:
interceptionContext- context with invocation metadatachain- invocation chaincall- gRPC server callheaders- gRPC request headers- Returns:
- server call listener
- Throws:
Exception- in case the invocation fails, or the interceptor needs to stop processing of the request
-