public class GrpcExceptionInterceptor extends Object implements ServerInterceptor
Throwable is caught and being processed.
Actual processing of exception is in GrpcExceptionListener.
GrpcAdviceExceptionHandler,
GrpcExceptionListener| Constructor and Description |
|---|
GrpcExceptionInterceptor(GrpcExceptionResponseHandler grpcAdviceExceptionHandler)
Creates a new GrpcAdviceExceptionInterceptor.
|
| Modifier and Type | Method and Description |
|---|---|
<ReqT,RespT> |
interceptCall(ServerCall<ReqT,RespT> call,
Metadata headers,
ServerCallHandler<ReqT,RespT> next) |
protected <ReqT> ServerCall.Listener<ReqT> |
noOpCallListener()
Creates a new no-op call listener because you can neither return null nor throw an exception in
interceptCall(ServerCall, Metadata, ServerCallHandler). |
public GrpcExceptionInterceptor(GrpcExceptionResponseHandler grpcAdviceExceptionHandler)
grpcAdviceExceptionHandler - The exception handler to use.public <ReqT,RespT> ServerCall.Listener<ReqT> interceptCall(ServerCall<ReqT,RespT> call, Metadata headers, ServerCallHandler<ReqT,RespT> next)
interceptCall in interface ServerInterceptorprotected <ReqT> ServerCall.Listener<ReqT> noOpCallListener()
interceptCall(ServerCall, Metadata, ServerCallHandler).ReqT - The type of the request.