Package org.wildfly.security.mechanism
Class AuthenticationMechanismException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.wildfly.security.mechanism.AuthenticationMechanismException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ScramServerException
A network authentication mechanism exception.
- Author:
- David M. Lloyd
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newAuthenticationMechanismExceptioninstance.Constructs a newAuthenticationMechanismExceptioninstance with an initial message.AuthenticationMechanismException(String msg, Throwable cause) Constructs a newAuthenticationMechanismExceptioninstance with an initial message and cause.Constructs a newAuthenticationMechanismExceptioninstance with an initial cause. -
Method Summary
Modifier and TypeMethodDescriptionfromException(Exception source) Convert the given exception to anAuthenticationMechanismException.Convert this exception to an HTTP exception with the same message and stack trace.Convert this exception to a SASL exception with the same message and stack trace.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AuthenticationMechanismException
public AuthenticationMechanismException()Constructs a newAuthenticationMechanismExceptioninstance. The message is left blank (null), and no cause is specified. -
AuthenticationMechanismException
Constructs a newAuthenticationMechanismExceptioninstance with an initial message. No cause is specified.- Parameters:
msg- the message
-
AuthenticationMechanismException
Constructs a newAuthenticationMechanismExceptioninstance with an initial cause. If a non-nullcause is specified, its message is used to initialize the message of thisAuthenticationMechanismException; otherwise the message is left blank (null).- Parameters:
cause- the cause
-
AuthenticationMechanismException
Constructs a newAuthenticationMechanismExceptioninstance with an initial message and cause.- Parameters:
msg- the messagecause- the cause
-
-
Method Details
-
toSaslException
Convert this exception to a SASL exception with the same message and stack trace.- Returns:
- the SASL exception
-
toHttpAuthenticationException
Convert this exception to an HTTP exception with the same message and stack trace.- Returns:
- the HTTP exception
-
fromException
Convert the given exception to anAuthenticationMechanismException. If the given exception is already aAuthenticationMechanismException, it is returned as-is.- Parameters:
source- the source exception (must not benull)- Returns:
- the new exception instance (not
null)
-