Class 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 appropriate AuthExceptionHandlerProvider
    • Constructor Detail

      • AuthExceptionHandler

        public AuthExceptionHandler​(io.grpc.ServerCall.Listener<ReqT> listener,
                                    io.grpc.ServerCall<ReqT,​RespT> serverCall,
                                    io.grpc.Metadata metadata)
    • 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:
        handleException in class ExceptionHandler<ReqT,​RespT>
        Parameters:
        exception - exception thrown
        serverCall - server call to close with error
        metadata - call metadata
      • getPriority

        public int getPriority()
        Specified by:
        getPriority in interface javax.enterprise.inject.spi.Prioritized
      • onCancel

        public void onCancel()
        Overrides:
        onCancel in class io.grpc.ServerCall.Listener<ReqT extends Object>
      • onComplete

        public void onComplete()
        Overrides:
        onComplete in class io.grpc.ServerCall.Listener<ReqT extends Object>