|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--java.security.GeneralSecurityException | +--javax.security.auth.login.LoginException | +--com.sun.identity.authentication.spi.AuthLoginException
This class is for handling message localization in LoginException.
Constructor Summary | |
AuthLoginException(java.lang.String message)
Constructs a new AuthLoginException with the given
message. |
|
AuthLoginException(java.lang.String rbName,
java.lang.String errorCode,
java.lang.Object[] args)
Constructs a new AuthLoginException without a nested
Throwable . |
|
AuthLoginException(java.lang.String rbName,
java.lang.String errorCode,
java.lang.Object[] args,
java.lang.Throwable nestedException)
Constructs an instance of AuthLoginException to pass the
localized error message
At this level, the locale of the caller is not known and it is
not possible to throw localized error message at this level. |
|
AuthLoginException(java.lang.Throwable nestedException)
Constructs an AuthLoginException with given
Throwable . |
Method Summary | |
java.lang.String |
getErrorCode()
Returns the error code. |
java.lang.String |
getL10NMessage(java.util.Locale locale)
Returns the localized message of the given locale. |
java.lang.String |
getMessage()
Gets messages of the exceptions including the nested exceptions. |
java.lang.Object[] |
getMessageArgs()
Returns the error message arguments. |
java.lang.String |
getResourceBundleName()
Returns the resource bundle name. |
void |
printStackTrace()
Prints the stack trace of the root exception to standard error stream. |
void |
printStackTrace(java.io.PrintStream ps)
Prints the stack trace of the root exception to a PrintStream
Also prints the messages of all the exceptions starting from top
exception to the root exception, at the top of stack trace |
void |
printStackTrace(java.io.PrintWriter pw)
Prints the stack trace of the root exception to a PrintWriter . |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AuthLoginException(java.lang.Throwable nestedException)
AuthLoginException
with given
Throwable
.nestedException
- Exception nested in the new exception.public AuthLoginException(java.lang.String message)
AuthLoginException
with the given
message.message
- message for this exception. This message can be later
retrieved by getMessage()
method.public AuthLoginException(java.lang.String rbName, java.lang.String errorCode, java.lang.Object[] args, java.lang.Throwable nestedException)
AuthLoginException
to pass the
localized error message
At this level, the locale of the caller is not known and it is
not possible to throw localized error message at this level.
Instead this constructor provides Resource Bundle name
and errorCode
for correctly locating the error message. The
default getMessage()
will always return English messages
only. This is consistent with current JRE.rbName
- Resource Bundle Name to be used for getting
localized error message.errorCode
- Key to resource bundle. You can use
ResourceBundle rb = ResourceBunde.getBundle (rbName,locale); String localizedStr = rb.getString(errorCode)
args
- arguments to message. If it is not present pass them
as nullnestedException
- The nested Throwable
.public AuthLoginException(java.lang.String rbName, java.lang.String errorCode, java.lang.Object[] args)
AuthLoginException
without a nested
Throwable
.rbName
- Resource Bundle Name to be used for getting
localized error message.errorCode
- Key to resource bundle. You can use
ResourceBundle rb = ResourceBunde.getBundle (rbName,locale); String localizedStr = rb.getString(errorCode)
args
- arguments to message. If it is not present pass them
as nullMethod Detail |
public java.lang.String getL10NMessage(java.util.Locale locale)
getL10NMessage
in interface com.sun.identity.common.L10NMessage
locale
- the locale in which the message will be returned.public java.lang.String getResourceBundleName()
getResourceBundleName
in interface com.sun.identity.common.L10NMessage
getL10NMessage(java.util.Locale)
public java.lang.String getErrorCode()
getErrorCode
in interface com.sun.identity.common.L10NMessage
public java.lang.Object[] getMessageArgs()
getMessageArgs
in interface com.sun.identity.common.L10NMessage
MessageFormat
class to format the message.
It can be null.public java.lang.String getMessage()
getMessage
in interface com.sun.identity.common.L10NMessage
getMessage
in class java.lang.Throwable
public void printStackTrace()
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintWriter pw)
PrintWriter
. Also prints the messages of all the
exceptions starting from top exception to the root exception,
at the top of stack traceprintStackTrace
in class java.lang.Throwable
pw
- PrintWriter
to which to print the stack trace.public void printStackTrace(java.io.PrintStream ps)
PrintStream
Also prints the messages of all the exceptions starting from top
exception to the root exception, at the top of stack traceprintStackTrace
in class java.lang.Throwable
ps
- PrintStream
to which to print the stack trace
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |