Package io.quarkus.grpc.auth
Class AuthExceptionHandler<ReqT,RespT>
- java.lang.Object
-
- io.grpc.ServerCall.Listener<ReqT>
-
- io.grpc.ForwardingServerCallListener<ReqT>
-
- io.grpc.ForwardingServerCallListener.SimpleForwardingServerCallListener<ReqT>
-
- io.quarkus.grpc.ExceptionHandler<ReqT,RespT>
-
- io.quarkus.grpc.auth.AuthExceptionHandler<ReqT,RespT>
-
- All Implemented Interfaces:
javax.enterprise.inject.spi.Prioritized
public class AuthExceptionHandler<ReqT,RespT> extends ExceptionHandler<ReqT,RespT> implements javax.enterprise.inject.spi.Prioritized
Exception mapper for authentication and authorization exceptions To alter mapping exceptions, create a subclass of this handler and create an appropriateAuthExceptionHandlerProvider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.grpc.ForwardingServerCallListener
io.grpc.ForwardingServerCallListener.SimpleForwardingServerCallListener<ReqT extends Object>
-
-
Constructor Summary
Constructors Constructor Description AuthExceptionHandler(io.grpc.ServerCall.Listener<ReqT> listener, io.grpc.ServerCall<ReqT,RespT> serverCall, io.grpc.Metadata metadata)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetPriority()protected voidhandleException(Throwable exception, io.grpc.ServerCall<ReqT,RespT> serverCall, io.grpc.Metadata metadata)Maps exception to a gRPC error.voidonCancel()voidonComplete()StringtoString()-
Methods inherited from class io.quarkus.grpc.ExceptionHandler
onHalfClose, onMessage, onReady
-
-
-
-
Method Detail
-
handleException
protected void handleException(Throwable exception, io.grpc.ServerCall<ReqT,RespT> serverCall, io.grpc.Metadata metadata)
Maps exception to a gRPC error. Override this method to customize the mapping- Specified by:
handleExceptionin classExceptionHandler<ReqT,RespT>- Parameters:
exception- exception thrownserverCall- server call to close with errormetadata- call metadata
-
getPriority
public int getPriority()
- Specified by:
getPriorityin interfacejavax.enterprise.inject.spi.Prioritized
-
onCancel
public void onCancel()
- Overrides:
onCancelin classio.grpc.ServerCall.Listener<ReqT extends Object>
-
onComplete
public void onComplete()
- Overrides:
onCompletein classio.grpc.ServerCall.Listener<ReqT extends Object>
-
-