Package com.sun.identity.saml2.common
Class SAML2Exception
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.sun.identity.shared.locale.L10NMessageImpl
com.sun.identity.saml2.common.SAML2Exception
- All Implemented Interfaces:
com.sun.identity.shared.locale.L10NMessage
,Serializable
- Direct Known Subclasses:
SAML2InvalidNameIDPolicyException
,SAML2InvalidUserException
,XACMLException
This class is an extension point for all SAML related exceptions.
This class also handles message localization in SAML exceptions.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSAML2Exception
(String message) Constructs a newSAML2Exception
with the given message.SAML2Exception
(String rbName, String errorCode, Object... args) Constructs a newSAML2Exception
without a nestedThrowable
.SAML2Exception
(String message, Throwable cause) Constructs a newSAML2Exception
with the given message and throwable.Constructs anSAML2Exception
with givenThrowable
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if the response has been redirected already to another URL, returns false otherwise.void
setRedirectionDone
(boolean redirectionDone) Sets redirection done flag.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
SAML2Exception
Constructs a newSAML2Exception
without a nestedThrowable
.- Parameters:
rbName
- Resource Bundle Name to be used for getting localized error message.errorCode
- Key to resource bundle. You can useResourceBundle rb = ResourceBunde.getBundle (rbName,locale); String localizedStr = rb.getString(errorCode);
args
- arguments to message. If it is not present pass them as null
-
SAML2Exception
Constructs a newSAML2Exception
with the given message.- Parameters:
message
- message for this exception. This message can be later retrieved bygetMessage()
method.
-
SAML2Exception
Constructs a newSAML2Exception
with the given message and throwable.- Parameters:
message
- message for this exception.cause
- Exception nested in the new exception.
-
SAML2Exception
Constructs anSAML2Exception
with givenThrowable
.- Parameters:
t
- Exception nested in the new exception.
-
-
Method Details
-
setRedirectionDone
public void setRedirectionDone(boolean redirectionDone) Sets redirection done flag.- Parameters:
redirectionDone
- true means that the response has been redirected already to another URL, false otherwise.
-
isRedirectionDone
public boolean isRedirectionDone()Returns true if the response has been redirected already to another URL, returns false otherwise.- Returns:
- true if the response has been redirected already to another URL, returns false otherwise.
-