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:
jakarta.enterprise.inject.spi.Prioritized

public class AuthExceptionHandler<ReqT,RespT> extends ExceptionHandler<ReqT,RespT> implements jakarta.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 Details

    • AuthExceptionHandler

      public AuthExceptionHandler(io.grpc.ServerCall.Listener<ReqT> listener, io.grpc.ServerCall<ReqT,RespT> serverCall, io.grpc.Metadata metadata)
  • Method Details

    • 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 jakarta.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>
    • toString

      public String toString()
      Overrides:
      toString in class Object