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
public class AuthenticationMechanismException extends IOException
A network authentication mechanism exception.- Author:
- David M. Lloyd
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description AuthenticationMechanismException()
Constructs a newAuthenticationMechanismException
instance.AuthenticationMechanismException(String msg)
Constructs a newAuthenticationMechanismException
instance with an initial message.AuthenticationMechanismException(String msg, Throwable cause)
Constructs a newAuthenticationMechanismException
instance with an initial message and cause.AuthenticationMechanismException(Throwable cause)
Constructs a newAuthenticationMechanismException
instance with an initial cause.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static <T extends Throwable>
TcopyContents(Exception source, T throwable)
static AuthenticationMechanismException
fromException(Exception source)
Convert the given exception to anAuthenticationMechanismException
.HttpAuthenticationException
toHttpAuthenticationException()
Convert this exception to an HTTP exception with the same message and stack trace.SaslException
toSaslException()
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
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AuthenticationMechanismException
public AuthenticationMechanismException()
Constructs a newAuthenticationMechanismException
instance. The message is left blank (null
), and no cause is specified.
-
AuthenticationMechanismException
public AuthenticationMechanismException(String msg)
Constructs a newAuthenticationMechanismException
instance with an initial message. No cause is specified.- Parameters:
msg
- the message
-
AuthenticationMechanismException
public AuthenticationMechanismException(Throwable cause)
Constructs a newAuthenticationMechanismException
instance with an initial cause. If a non-null
cause is specified, its message is used to initialize the message of thisAuthenticationMechanismException
; otherwise the message is left blank (null
).- Parameters:
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 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
)
-
-