Class FastUnsupportedCallbackException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- javax.security.auth.callback.UnsupportedCallbackException
-
- org.wildfly.security.auth.callback.FastUnsupportedCallbackException
-
- All Implemented Interfaces:
Serializable
public class FastUnsupportedCallbackException extends UnsupportedCallbackException
A version ofUnsupportedCallbackException
which does not initialize a full stack trace, and thus is much more efficient to construct.- Author:
- David M. Lloyd
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static StackTraceElement[]
NO_STACK
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description FastUnsupportedCallbackException(Callback callback)
Constructs a newFastUnsupportedCallbackException
instance.FastUnsupportedCallbackException(Callback callback, String msg)
Constructs a newFastUnsupportedCallbackException
instance with an initial message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Throwable
fillInStackTrace()
Does nothing but return this instance.String
getMessage()
Get the message for this exception, formatted with the callback.StackTraceElement[]
getStackTrace()
Returns an empty stack.Throwable
initCause(Throwable cause)
Does nothing but return this instance.void
setStackTrace(StackTraceElement[] stackTrace)
Does nothing.-
Methods inherited from class javax.security.auth.callback.UnsupportedCallbackException
getCallback
-
Methods inherited from class java.lang.Throwable
addSuppressed, getCause, getLocalizedMessage, getSuppressed, printStackTrace, printStackTrace, printStackTrace, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
NO_STACK
private static final StackTraceElement[] NO_STACK
-
-
Constructor Detail
-
FastUnsupportedCallbackException
public FastUnsupportedCallbackException(Callback callback)
Constructs a newFastUnsupportedCallbackException
instance. The message is left blank (null
), and no cause is specified.- Parameters:
callback
- the callback which is not supported (should not benull
)
-
FastUnsupportedCallbackException
public FastUnsupportedCallbackException(Callback callback, String msg)
Constructs a newFastUnsupportedCallbackException
instance with an initial message. No cause is specified.- Parameters:
callback
- the callback which is not supported (should not benull
)msg
- the message
-
-
Method Detail
-
getStackTrace
public StackTraceElement[] getStackTrace()
Returns an empty stack.- Overrides:
getStackTrace
in classThrowable
- Returns:
- an empty stack
-
fillInStackTrace
public Throwable fillInStackTrace()
Does nothing but return this instance.- Overrides:
fillInStackTrace
in classThrowable
- Returns:
- this instance
-
setStackTrace
public void setStackTrace(StackTraceElement[] stackTrace)
Does nothing.- Overrides:
setStackTrace
in classThrowable
- Parameters:
stackTrace
- ignored
-
getMessage
public String getMessage()
Get the message for this exception, formatted with the callback.- Overrides:
getMessage
in classThrowable
- Returns:
- the message for this exception, with the callback (not
null
)
-
-