Package org.apache.shiro.subject.support
Class DisabledSessionException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apache.shiro.ShiroException
-
- org.apache.shiro.session.SessionException
-
- org.apache.shiro.subject.support.DisabledSessionException
-
- All Implemented Interfaces:
Serializable
public class DisabledSessionException extends SessionException
Exception thrown if attempting to create a newSubject
session
, but thatSubject
's sessions are disabled. Note that this exception represents an invalid API usage scenario - where Shiro has been configured to disable sessions for a particular subject, but a developer is attempting to use that Subject's session. In other words, if this exception is encountered, it should be resolved by a configuration change for Shiro and not by checking every Subject to see if they are enabled or not (which would likely introduce very ugly/paranoid code checks everywhere a session is needed). This is why there is nosubject.isSessionEnabled()
method.- Since:
- 1.2
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DisabledSessionException(String message)
-
Method Summary
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
DisabledSessionException
public DisabledSessionException(String message)
-
-