Class AuthenticationMechanismException

    • Constructor Detail

      • AuthenticationMechanismException

        public AuthenticationMechanismException()
        Constructs a new AuthenticationMechanismException instance. The message is left blank (null), and no cause is specified.
      • AuthenticationMechanismException

        public AuthenticationMechanismException​(String msg)
        Constructs a new AuthenticationMechanismException instance with an initial message. No cause is specified.
        Parameters:
        msg - the message
      • AuthenticationMechanismException

        public AuthenticationMechanismException​(Throwable cause)
        Constructs a new AuthenticationMechanismException instance with an initial cause. If a non-null cause is specified, its message is used to initialize the message of this AuthenticationMechanismException; otherwise the message is left blank (null).
        Parameters:
        cause - the cause
      • AuthenticationMechanismException

        public AuthenticationMechanismException​(String msg,
                                                Throwable cause)
        Constructs a new AuthenticationMechanismException instance with an initial message and cause.
        Parameters:
        msg - the message
        cause - the cause
    • Method Detail

      • toSaslException

        public SaslException toSaslException()
        Convert this exception to a SASL exception with the same message and stack trace.
        Returns:
        the SASL exception
      • toHttpAuthenticationException

        public HttpAuthenticationException toHttpAuthenticationException()
        Convert this exception to an HTTP exception with the same message and stack trace.
        Returns:
        the HTTP exception
      • fromException

        public static AuthenticationMechanismException fromException​(Exception source)
        Convert the given exception to an AuthenticationMechanismException. If the given exception is already a AuthenticationMechanismException, it is returned as-is.
        Parameters:
        source - the source exception (must not be null)
        Returns:
        the new exception instance (not null)