Package com.sun.identity.plugin.session
Class SessionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.sun.identity.shared.locale.L10NMessageImpl
com.sun.identity.plugin.session.SessionException
- All Implemented Interfaces:
com.sun.identity.shared.locale.L10NMessage
,Serializable
This class is to handle Session related exceptions.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic int
static int
Error codes.static int
static int
-
Constructor Summary
ConstructorDescriptionConstructs aSessionException
with an exception.SessionException
(String message) Constructs aSessionException
with a detailed message.SessionException
(String rbName, String messageKey, Object[] args) Constructs a newSessionException
without a nestedThrowable
.SessionException
(Throwable rootCause) Constructs aSessionException
with an embedded exception. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the error code for the caller of aSessionProvider
method.void
setErrCode
(int errorCode) Sets an error code by an implementation of theSessionProvider
to indicate a specific error condition which could be retrieved by the caller of a SessionProvider method.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
AUTH_ERROR_NOT_DEFINED
public static int AUTH_ERROR_NOT_DEFINEDError codes. -
AUTH_USER_INACTIVE
public static int AUTH_USER_INACTIVE -
AUTH_USER_LOCKED
public static int AUTH_USER_LOCKED -
AUTH_ACCOUNT_EXPIRED
public static int AUTH_ACCOUNT_EXPIRED
-
-
Constructor Details
-
SessionException
Constructs aSessionException
with a detailed message.- Parameters:
message
- Detailed message for this exception.
-
SessionException
Constructs aSessionException
with an embedded exception.- Parameters:
rootCause
- An embedded exception
-
SessionException
Constructs aSessionException
with an exception.- Parameters:
ex
- an exception
-
SessionException
Constructs a newSessionException
without a nestedThrowable
.- Parameters:
rbName
- Resource Bundle Name to be used for getting localized error message.messageKey
- Key to resource bundle. You can useResourceBundle rb = ResourceBunde.getBundle (rbName,locale); String localizedStr = rb.getString(messageCode);
args
- arguments to message. If it is not present pass them as null
-
-
Method Details
-
getErrCode
public int getErrCode()Returns the error code for the caller of aSessionProvider
method.- Returns:
- Error code.
-
setErrCode
public void setErrCode(int errorCode) Sets an error code by an implementation of theSessionProvider
to indicate a specific error condition which could be retrieved by the caller of a SessionProvider method.- Parameters:
errorCode
- the error code to be set.
-