| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>AbstractValidatingSessionManager (Apache Shiro :: Core 1.10.1 API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.min.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../jquery-ui.overrides.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../../jquery/jquery-3.6.0.min.js"></script> |
| <script type="text/javascript" src="../../../../../jquery/jquery-ui.min.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="AbstractValidatingSessionManager (Apache Shiro :: Core 1.10.1 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":6,"i8":10,"i9":10,"i10":10,"i11":6,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":6,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../../"; |
| var useModuleDirectories = true; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"><!-- Matomo --> <script> var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ /* We explicitly disable cookie tracking to avoid privacy issues */ _paq.push(['disableCookies']); _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="//matomo.privacy.apache.org/"; _paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push(['setSiteId', '2']); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); })(); </script> <!-- End Matomo Code --> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/AbstractValidatingSessionManager.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.apache.shiro.session.mgt</a></div> |
| <h2 title="Class AbstractValidatingSessionManager" class="title">Class AbstractValidatingSessionManager</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="AbstractSessionManager.html" title="class in org.apache.shiro.session.mgt">org.apache.shiro.session.mgt.AbstractSessionManager</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="AbstractNativeSessionManager.html" title="class in org.apache.shiro.session.mgt">org.apache.shiro.session.mgt.AbstractNativeSessionManager</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.shiro.session.mgt.AbstractValidatingSessionManager</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code>org.apache.shiro.event.EventBusAware</code>, <code><a href="NativeSessionManager.html" title="interface in org.apache.shiro.session.mgt">NativeSessionManager</a></code>, <code><a href="SessionManager.html" title="interface in org.apache.shiro.session.mgt">SessionManager</a></code>, <code><a href="ValidatingSessionManager.html" title="interface in org.apache.shiro.session.mgt">ValidatingSessionManager</a></code>, <code>org.apache.shiro.util.Destroyable</code></dd> |
| </dl> |
| <dl> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><code><a href="DefaultSessionManager.html" title="class in org.apache.shiro.session.mgt">DefaultSessionManager</a></code></dd> |
| </dl> |
| <hr> |
| <pre>public abstract class <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.39">AbstractValidatingSessionManager</a> |
| extends <a href="AbstractNativeSessionManager.html" title="class in org.apache.shiro.session.mgt">AbstractNativeSessionManager</a> |
| implements <a href="ValidatingSessionManager.html" title="interface in org.apache.shiro.session.mgt">ValidatingSessionManager</a>, org.apache.shiro.util.Destroyable</pre> |
| <div class="block">Default business-tier implementation of the <a href="ValidatingSessionManager.html" title="interface in org.apache.shiro.session.mgt"><code>ValidatingSessionManager</code></a> interface.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.1</dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Field</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_SESSION_VALIDATION_INTERVAL">DEFAULT_SESSION_VALIDATION_INTERVAL</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">The default interval at which sessions will be validated (1 hour); |
| This can be overridden by calling <a href="#setSessionValidationInterval(long)"><code>setSessionValidationInterval(long)</code></a></div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected long</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sessionValidationInterval">sessionValidationInterval</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected <a href="SessionValidationScheduler.html" title="interface in org.apache.shiro.session.mgt">SessionValidationScheduler</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sessionValidationScheduler">sessionValidationScheduler</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Scheduler used to validate sessions on a regular basis.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sessionValidationSchedulerEnabled">sessionValidationSchedulerEnabled</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="fields.inherited.from.class.org.apache.shiro.session.mgt.AbstractSessionManager"> |
| <!-- --> |
| </a> |
| <h3>Fields inherited from class org.apache.shiro.session.mgt.<a href="AbstractSessionManager.html" title="class in org.apache.shiro.session.mgt">AbstractSessionManager</a></h3> |
| <code><a href="AbstractSessionManager.html#DEFAULT_GLOBAL_SESSION_TIMEOUT">DEFAULT_GLOBAL_SESSION_TIMEOUT</a>, <a href="AbstractSessionManager.html#MILLIS_PER_HOUR">MILLIS_PER_HOUR</a>, <a href="AbstractSessionManager.html#MILLIS_PER_MINUTE">MILLIS_PER_MINUTE</a>, <a href="AbstractSessionManager.html#MILLIS_PER_SECOND">MILLIS_PER_SECOND</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Constructor</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">AbstractValidatingSessionManager</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#afterExpired(org.apache.shiro.session.Session)">afterExpired</a></span>​(<a href="../Session.html" title="interface in org.apache.shiro.session">Session</a> session)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#afterSessionValidationEnabled()">afterSessionValidationEnabled</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#beforeSessionValidationDisabled()">beforeSessionValidationDisabled</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="../Session.html" title="interface in org.apache.shiro.session">Session</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createSession(org.apache.shiro.session.mgt.SessionContext)">createSession</a></span>​(<a href="SessionContext.html" title="interface in org.apache.shiro.session.mgt">SessionContext</a> context)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a new <code>Session Session</code> instance based on the specified (possibly <code>null</code>) |
| initialization data.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>protected <a href="SessionValidationScheduler.html" title="interface in org.apache.shiro.session.mgt">SessionValidationScheduler</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createSessionValidationScheduler()">createSessionValidationScheduler</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#destroy()">destroy</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#disableSessionValidation()">disableSessionValidation</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>protected abstract <a href="../Session.html" title="interface in org.apache.shiro.session">Session</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#doCreateSession(org.apache.shiro.session.mgt.SessionContext)">doCreateSession</a></span>​(<a href="SessionContext.html" title="interface in org.apache.shiro.session.mgt">SessionContext</a> initData)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>protected <a href="../Session.html" title="interface in org.apache.shiro.session">Session</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#doGetSession(org.apache.shiro.session.mgt.SessionKey)">doGetSession</a></span>​(<a href="SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</a> key)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#doValidate(org.apache.shiro.session.Session)">doValidate</a></span>​(<a href="../Session.html" title="interface in org.apache.shiro.session">Session</a> session)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#enableSessionValidation()">enableSessionValidation</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>protected abstract <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a><<a href="../Session.html" title="interface in org.apache.shiro.session">Session</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getActiveSessions()">getActiveSessions</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSessionValidationInterval()">getSessionValidationInterval</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code><a href="SessionValidationScheduler.html" title="interface in org.apache.shiro.session.mgt">SessionValidationScheduler</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSessionValidationScheduler()">getSessionValidationScheduler</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>protected long</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTimeout(org.apache.shiro.session.Session)">getTimeout</a></span>​(<a href="../Session.html" title="interface in org.apache.shiro.session">Session</a> session)</code></th> |
| <td class="colLast"> |
| <div class="block">Subclass template hook in case per-session timeout is not based on |
| <a href="../Session.html#getTimeout()"><code>Session.getTimeout()</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isSessionValidationSchedulerEnabled()">isSessionValidationSchedulerEnabled</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onExpiration(org.apache.shiro.session.Session)">onExpiration</a></span>​(<a href="../Session.html" title="interface in org.apache.shiro.session">Session</a> session)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onExpiration(org.apache.shiro.session.Session,org.apache.shiro.session.ExpiredSessionException,org.apache.shiro.session.mgt.SessionKey)">onExpiration</a></span>​(<a href="../Session.html" title="interface in org.apache.shiro.session">Session</a> s, |
| <a href="../ExpiredSessionException.html" title="class in org.apache.shiro.session">ExpiredSessionException</a> ese, |
| <a href="SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</a> key)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onInvalidation(org.apache.shiro.session.Session,org.apache.shiro.session.InvalidSessionException,org.apache.shiro.session.mgt.SessionKey)">onInvalidation</a></span>​(<a href="../Session.html" title="interface in org.apache.shiro.session">Session</a> s, |
| <a href="../InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</a> ise, |
| <a href="SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</a> key)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>protected abstract <a href="../Session.html" title="interface in org.apache.shiro.session">Session</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#retrieveSession(org.apache.shiro.session.mgt.SessionKey)">retrieveSession</a></span>​(<a href="SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</a> key)</code></th> |
| <td class="colLast"> |
| <div class="block">Looks up a session from the underlying data store based on the specified session key.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSessionValidationInterval(long)">setSessionValidationInterval</a></span>​(long sessionValidationInterval)</code></th> |
| <td class="colLast"> |
| <div class="block">If using the underlying default <tt>SessionValidationScheduler</tt> (that is, the |
| <a href="#setSessionValidationScheduler(org.apache.shiro.session.mgt.SessionValidationScheduler)"><code>setSessionValidationScheduler</code></a> method is |
| never called) , this method allows one to specify how |
| frequently session should be validated (to check for orphans).</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSessionValidationScheduler(org.apache.shiro.session.mgt.SessionValidationScheduler)">setSessionValidationScheduler</a></span>​(<a href="SessionValidationScheduler.html" title="interface in org.apache.shiro.session.mgt">SessionValidationScheduler</a> sessionValidationScheduler)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSessionValidationSchedulerEnabled(boolean)">setSessionValidationSchedulerEnabled</a></span>​(boolean sessionValidationSchedulerEnabled)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#validate(org.apache.shiro.session.Session,org.apache.shiro.session.mgt.SessionKey)">validate</a></span>​(<a href="../Session.html" title="interface in org.apache.shiro.session">Session</a> session, |
| <a href="SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</a> key)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#validateSessions()">validateSessions</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Performs session validation for all open/active sessions in the system (those that |
| have not been stopped or expired), and validates each one.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.org.apache.shiro.session.mgt.AbstractNativeSessionManager"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.shiro.session.mgt.<a href="AbstractNativeSessionManager.html" title="class in org.apache.shiro.session.mgt">AbstractNativeSessionManager</a></h3> |
| <code><a href="AbstractNativeSessionManager.html#afterStopped(org.apache.shiro.session.Session)">afterStopped</a>, <a href="AbstractNativeSessionManager.html#applyGlobalSessionTimeout(org.apache.shiro.session.Session)">applyGlobalSessionTimeout</a>, <a href="AbstractNativeSessionManager.html#beforeInvalidNotification(org.apache.shiro.session.Session)">beforeInvalidNotification</a>, <a href="AbstractNativeSessionManager.html#checkValid(org.apache.shiro.session.mgt.SessionKey)">checkValid</a>, <a href="AbstractNativeSessionManager.html#createExposedSession(org.apache.shiro.session.Session,org.apache.shiro.session.mgt.SessionContext)">createExposedSession</a>, <a href="AbstractNativeSessionManager.html#createExposedSession(org.apache.shiro.session.Session,org.apache.shiro.session.mgt.SessionKey)">createExposedSession</a>, <a href="AbstractNativeSessionManager.html#getAttribute(org.apache.shiro.session.mgt.SessionKey,java.lang.Object)">getAttribute</a>, <a href="AbstractNativeSessionManager.html#getAttributeKeys(org.apache.shiro.session.mgt.SessionKey)">getAttributeKeys</a>, <a href="AbstractNativeSessionManager.html#getEventBus()">getEventBus</a>, <a href="AbstractNativeSessionManager.html#getHost(org.apache.shiro.session.mgt.SessionKey)">getHost</a>, <a href="AbstractNativeSessionManager.html#getLastAccessTime(org.apache.shiro.session.mgt.SessionKey)">getLastAccessTime</a>, <a href="AbstractNativeSessionManager.html#getSession(org.apache.shiro.session.mgt.SessionKey)">getSession</a>, <a href="AbstractNativeSessionManager.html#getSessionListeners()">getSessionListeners</a>, <a href="AbstractNativeSessionManager.html#getStartTimestamp(org.apache.shiro.session.mgt.SessionKey)">getStartTimestamp</a>, <a href="AbstractNativeSessionManager.html#getTimeout(org.apache.shiro.session.mgt.SessionKey)">getTimeout</a>, <a href="AbstractNativeSessionManager.html#isValid(org.apache.shiro.session.mgt.SessionKey)">isValid</a>, <a href="AbstractNativeSessionManager.html#notifyExpiration(org.apache.shiro.session.Session)">notifyExpiration</a>, <a href="AbstractNativeSessionManager.html#notifyStart(org.apache.shiro.session.Session)">notifyStart</a>, <a href="AbstractNativeSessionManager.html#notifyStop(org.apache.shiro.session.Session)">notifyStop</a>, <a href="AbstractNativeSessionManager.html#onChange(org.apache.shiro.session.Session)">onChange</a>, <a href="AbstractNativeSessionManager.html#onStart(org.apache.shiro.session.Session,org.apache.shiro.session.mgt.SessionContext)">onStart</a>, <a href="AbstractNativeSessionManager.html#onStop(org.apache.shiro.session.Session)">onStop</a>, <a href="AbstractNativeSessionManager.html#onStop(org.apache.shiro.session.Session,org.apache.shiro.session.mgt.SessionKey)">onStop</a>, <a href="AbstractNativeSessionManager.html#publishEvent(java.lang.Object)">publishEvent</a>, <a href="AbstractNativeSessionManager.html#removeAttribute(org.apache.shiro.session.mgt.SessionKey,java.lang.Object)">removeAttribute</a>, <a href="AbstractNativeSessionManager.html#setAttribute(org.apache.shiro.session.mgt.SessionKey,java.lang.Object,java.lang.Object)">setAttribute</a>, <a href="AbstractNativeSessionManager.html#setEventBus(org.apache.shiro.event.EventBus)">setEventBus</a>, <a href="AbstractNativeSessionManager.html#setSessionListeners(java.util.Collection)">setSessionListeners</a>, <a href="AbstractNativeSessionManager.html#setTimeout(org.apache.shiro.session.mgt.SessionKey,long)">setTimeout</a>, <a href="AbstractNativeSessionManager.html#start(org.apache.shiro.session.mgt.SessionContext)">start</a>, <a href="AbstractNativeSessionManager.html#stop(org.apache.shiro.session.mgt.SessionKey)">stop</a>, <a href="AbstractNativeSessionManager.html#touch(org.apache.shiro.session.mgt.SessionKey)">touch</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.org.apache.shiro.session.mgt.AbstractSessionManager"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.shiro.session.mgt.<a href="AbstractSessionManager.html" title="class in org.apache.shiro.session.mgt">AbstractSessionManager</a></h3> |
| <code><a href="AbstractSessionManager.html#getGlobalSessionTimeout()">getGlobalSessionTimeout</a>, <a href="AbstractSessionManager.html#setGlobalSessionTimeout(long)">setGlobalSessionTimeout</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.org.apache.shiro.session.mgt.SessionManager"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.shiro.session.mgt.<a href="SessionManager.html" title="interface in org.apache.shiro.session.mgt">SessionManager</a></h3> |
| <code><a href="SessionManager.html#getSession(org.apache.shiro.session.mgt.SessionKey)">getSession</a>, <a href="SessionManager.html#start(org.apache.shiro.session.mgt.SessionContext)">start</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a id="DEFAULT_SESSION_VALIDATION_INTERVAL"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>DEFAULT_SESSION_VALIDATION_INTERVAL</h4> |
| <pre>public static final long <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.50">DEFAULT_SESSION_VALIDATION_INTERVAL</a></pre> |
| <div class="block">The default interval at which sessions will be validated (1 hour); |
| This can be overridden by calling <a href="#setSessionValidationInterval(long)"><code>setSessionValidationInterval(long)</code></a></div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../constant-values.html#org.apache.shiro.session.mgt.AbstractValidatingSessionManager.DEFAULT_SESSION_VALIDATION_INTERVAL">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="sessionValidationSchedulerEnabled"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sessionValidationSchedulerEnabled</h4> |
| <pre>protected boolean <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.52">sessionValidationSchedulerEnabled</a></pre> |
| </li> |
| </ul> |
| <a id="sessionValidationScheduler"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>sessionValidationScheduler</h4> |
| <pre>protected <a href="SessionValidationScheduler.html" title="interface in org.apache.shiro.session.mgt">SessionValidationScheduler</a> <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.57">sessionValidationScheduler</a></pre> |
| <div class="block">Scheduler used to validate sessions on a regular basis.</div> |
| </li> |
| </ul> |
| <a id="sessionValidationInterval"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>sessionValidationInterval</h4> |
| <pre>protected long <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.59">sessionValidationInterval</a></pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a id="<init>()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>AbstractValidatingSessionManager</h4> |
| <pre>public <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.61">AbstractValidatingSessionManager</a>()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="isSessionValidationSchedulerEnabled()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isSessionValidationSchedulerEnabled</h4> |
| <pre class="methodSignature">public boolean <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.66">isSessionValidationSchedulerEnabled</a>()</pre> |
| </li> |
| </ul> |
| <a id="setSessionValidationSchedulerEnabled(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setSessionValidationSchedulerEnabled</h4> |
| <pre class="methodSignature">public void <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.70">setSessionValidationSchedulerEnabled</a>​(boolean sessionValidationSchedulerEnabled)</pre> |
| </li> |
| </ul> |
| <a id="setSessionValidationScheduler(org.apache.shiro.session.mgt.SessionValidationScheduler)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setSessionValidationScheduler</h4> |
| <pre class="methodSignature">public void <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.75">setSessionValidationScheduler</a>​(<a href="SessionValidationScheduler.html" title="interface in org.apache.shiro.session.mgt">SessionValidationScheduler</a> sessionValidationScheduler)</pre> |
| </li> |
| </ul> |
| <a id="getSessionValidationScheduler()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSessionValidationScheduler</h4> |
| <pre class="methodSignature">public <a href="SessionValidationScheduler.html" title="interface in org.apache.shiro.session.mgt">SessionValidationScheduler</a> <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.79">getSessionValidationScheduler</a>()</pre> |
| </li> |
| </ul> |
| <a id="setSessionValidationInterval(long)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setSessionValidationInterval</h4> |
| <pre class="methodSignature">public void <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.104">setSessionValidationInterval</a>​(long sessionValidationInterval)</pre> |
| <div class="block">If using the underlying default <tt>SessionValidationScheduler</tt> (that is, the |
| <a href="#setSessionValidationScheduler(org.apache.shiro.session.mgt.SessionValidationScheduler)"><code>setSessionValidationScheduler</code></a> method is |
| never called) , this method allows one to specify how |
| frequently session should be validated (to check for orphans). The default value is |
| <a href="#DEFAULT_SESSION_VALIDATION_INTERVAL"><code>DEFAULT_SESSION_VALIDATION_INTERVAL</code></a>. |
| <p/> |
| If you override the default scheduler, it is assumed that overriding instance 'knows' how often to |
| validate sessions, and this attribute will be ignored. |
| <p/> |
| Unless this method is called, the default value is <a href="#DEFAULT_SESSION_VALIDATION_INTERVAL"><code>DEFAULT_SESSION_VALIDATION_INTERVAL</code></a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>sessionValidationInterval</code> - the time in milliseconds between checking for valid sessions to reap orphans.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getSessionValidationInterval()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSessionValidationInterval</h4> |
| <pre class="methodSignature">public long <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.108">getSessionValidationInterval</a>()</pre> |
| </li> |
| </ul> |
| <a id="doGetSession(org.apache.shiro.session.mgt.SessionKey)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>doGetSession</h4> |
| <pre class="methodSignature">protected final <a href="../Session.html" title="interface in org.apache.shiro.session">Session</a> <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.112">doGetSession</a>​(<a href="SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</a> key) |
| throws <a href="../InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</a></pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="AbstractNativeSessionManager.html#doGetSession(org.apache.shiro.session.mgt.SessionKey)">doGetSession</a></code> in class <code><a href="AbstractNativeSessionManager.html" title="class in org.apache.shiro.session.mgt">AbstractNativeSessionManager</a></code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="retrieveSession(org.apache.shiro.session.mgt.SessionKey)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>retrieveSession</h4> |
| <pre class="methodSignature">protected abstract <a href="../Session.html" title="interface in org.apache.shiro.session">Session</a> <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.132">retrieveSession</a>​(<a href="SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</a> key) |
| throws <a href="../UnknownSessionException.html" title="class in org.apache.shiro.session">UnknownSessionException</a></pre> |
| <div class="block">Looks up a session from the underlying data store based on the specified session key.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - the session key to use to look up the target session.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the session identified by <code>sessionId</code>.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../UnknownSessionException.html" title="class in org.apache.shiro.session">UnknownSessionException</a></code> - if there is no session identified by <code>sessionId</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="createSession(org.apache.shiro.session.mgt.SessionContext)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createSession</h4> |
| <pre class="methodSignature">protected <a href="../Session.html" title="interface in org.apache.shiro.session">Session</a> <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.134">createSession</a>​(<a href="SessionContext.html" title="interface in org.apache.shiro.session.mgt">SessionContext</a> context) |
| throws <a href="../../authz/AuthorizationException.html" title="class in org.apache.shiro.authz">AuthorizationException</a></pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="AbstractNativeSessionManager.html#createSession(org.apache.shiro.session.mgt.SessionContext)">AbstractNativeSessionManager</a></code></span></div> |
| <div class="block">Creates a new <code>Session Session</code> instance based on the specified (possibly <code>null</code>) |
| initialization data. Implementing classes must manage the persistent state of the returned session such that it |
| could later be acquired via the <a href="AbstractNativeSessionManager.html#getSession(org.apache.shiro.session.mgt.SessionKey)"><code>AbstractNativeSessionManager.getSession(SessionKey)</code></a> method.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="AbstractNativeSessionManager.html#createSession(org.apache.shiro.session.mgt.SessionContext)">createSession</a></code> in class <code><a href="AbstractNativeSessionManager.html" title="class in org.apache.shiro.session.mgt">AbstractNativeSessionManager</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>context</code> - the initialization data that can be used by the implementation or underlying |
| <a href="SessionFactory.html" title="interface in org.apache.shiro.session.mgt"><code>SessionFactory</code></a> when instantiating the internal <code>Session</code> instance.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the new <code>Session</code> instance.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../authz/HostUnauthorizedException.html" title="class in org.apache.shiro.authz">HostUnauthorizedException</a></code> - if the system access control policy restricts access based |
| on client location/IP and the specified hostAddress hasn't been enabled.</dd> |
| <dd><code><a href="../../authz/AuthorizationException.html" title="class in org.apache.shiro.authz">AuthorizationException</a></code> - if the system access control policy does not allow the currently executing |
| caller to start sessions.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="doCreateSession(org.apache.shiro.session.mgt.SessionContext)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>doCreateSession</h4> |
| <pre class="methodSignature">protected abstract <a href="../Session.html" title="interface in org.apache.shiro.session">Session</a> <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.139">doCreateSession</a>​(<a href="SessionContext.html" title="interface in org.apache.shiro.session.mgt">SessionContext</a> initData) |
| throws <a href="../../authz/AuthorizationException.html" title="class in org.apache.shiro.authz">AuthorizationException</a></pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../authz/AuthorizationException.html" title="class in org.apache.shiro.authz">AuthorizationException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="validate(org.apache.shiro.session.Session,org.apache.shiro.session.mgt.SessionKey)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>validate</h4> |
| <pre class="methodSignature">protected void <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.141">validate</a>​(<a href="../Session.html" title="interface in org.apache.shiro.session">Session</a> session, |
| <a href="SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</a> key) |
| throws <a href="../InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</a></pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="onExpiration(org.apache.shiro.session.Session,org.apache.shiro.session.ExpiredSessionException,org.apache.shiro.session.mgt.SessionKey)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>onExpiration</h4> |
| <pre class="methodSignature">protected void <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.153">onExpiration</a>​(<a href="../Session.html" title="interface in org.apache.shiro.session">Session</a> s, |
| <a href="../ExpiredSessionException.html" title="class in org.apache.shiro.session">ExpiredSessionException</a> ese, |
| <a href="SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</a> key)</pre> |
| </li> |
| </ul> |
| <a id="onExpiration(org.apache.shiro.session.Session)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>onExpiration</h4> |
| <pre class="methodSignature">protected void <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.163">onExpiration</a>​(<a href="../Session.html" title="interface in org.apache.shiro.session">Session</a> session)</pre> |
| </li> |
| </ul> |
| <a id="afterExpired(org.apache.shiro.session.Session)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>afterExpired</h4> |
| <pre class="methodSignature">protected void <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.167">afterExpired</a>​(<a href="../Session.html" title="interface in org.apache.shiro.session">Session</a> session)</pre> |
| </li> |
| </ul> |
| <a id="onInvalidation(org.apache.shiro.session.Session,org.apache.shiro.session.InvalidSessionException,org.apache.shiro.session.mgt.SessionKey)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>onInvalidation</h4> |
| <pre class="methodSignature">protected void <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.170">onInvalidation</a>​(<a href="../Session.html" title="interface in org.apache.shiro.session">Session</a> s, |
| <a href="../InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</a> ise, |
| <a href="SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</a> key)</pre> |
| </li> |
| </ul> |
| <a id="doValidate(org.apache.shiro.session.Session)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>doValidate</h4> |
| <pre class="methodSignature">protected void <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.184">doValidate</a>​(<a href="../Session.html" title="interface in org.apache.shiro.session">Session</a> session) |
| throws <a href="../InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</a></pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getTimeout(org.apache.shiro.session.Session)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTimeout</h4> |
| <pre class="methodSignature">protected long <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.205">getTimeout</a>​(<a href="../Session.html" title="interface in org.apache.shiro.session">Session</a> session)</pre> |
| <div class="block">Subclass template hook in case per-session timeout is not based on |
| <a href="../Session.html#getTimeout()"><code>Session.getTimeout()</code></a>. |
| <p/> |
| <p>This implementation merely returns <a href="../Session.html#getTimeout()"><code>Session.getTimeout()</code></a></p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>session</code> - the session for which to determine session timeout.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the time in milliseconds the specified session may remain idle before expiring.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="createSessionValidationScheduler()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createSessionValidationScheduler</h4> |
| <pre class="methodSignature">protected <a href="SessionValidationScheduler.html" title="interface in org.apache.shiro.session.mgt">SessionValidationScheduler</a> <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.209">createSessionValidationScheduler</a>()</pre> |
| </li> |
| </ul> |
| <a id="enableSessionValidation()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>enableSessionValidation</h4> |
| <pre class="methodSignature">protected void <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.223">enableSessionValidation</a>()</pre> |
| </li> |
| </ul> |
| <a id="afterSessionValidationEnabled()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>afterSessionValidationEnabled</h4> |
| <pre class="methodSignature">protected void <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.240">afterSessionValidationEnabled</a>()</pre> |
| </li> |
| </ul> |
| <a id="disableSessionValidation()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>disableSessionValidation</h4> |
| <pre class="methodSignature">protected void <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.243">disableSessionValidation</a>()</pre> |
| </li> |
| </ul> |
| <a id="beforeSessionValidationDisabled()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>beforeSessionValidationDisabled</h4> |
| <pre class="methodSignature">protected void <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.263">beforeSessionValidationDisabled</a>()</pre> |
| </li> |
| </ul> |
| <a id="destroy()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>destroy</h4> |
| <pre class="methodSignature">public void <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.266">destroy</a>()</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>destroy</code> in interface <code>org.apache.shiro.util.Destroyable</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="validateSessions()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>validateSessions</h4> |
| <pre class="methodSignature">public void <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.273">validateSessions</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="ValidatingSessionManager.html#validateSessions()">ValidatingSessionManager</a></code></span></div> |
| <div class="block">Performs session validation for all open/active sessions in the system (those that |
| have not been stopped or expired), and validates each one. If a session is |
| found to be invalid (e.g. it has expired), it is updated and saved to the EIS. |
| <p/> |
| This method is necessary in order to handle orphaned sessions and is expected to be run at |
| a regular interval, such as once an hour, once a day or once a week, etc. |
| The "best" frequency to run this method is entirely dependent upon the application |
| and would be based on factors such as performance, average number of active users, hours of |
| least activity, and other things. |
| <p/> |
| Most enterprise applications use a request/response programming model. |
| This is obvious in the case of web applications due to the HTTP protocol, but it is |
| equally true of remote client applications making remote method invocations. The server |
| essentially sits idle and only "works" when responding to client requests and/or |
| method invocations. This type of model is particularly efficient since it means the |
| security system only has to validate a session during those cases. Such |
| "lazy" behavior enables the system to lie stateless and/or idle and only incur |
| overhead for session validation when necessary. |
| <p/> |
| However, if a client forgets to log-out, or in the event of a server failure, it is |
| possible for sessions to be orphaned since no further requests would utilize that session. |
| Because of these lower-probability cases, it might be required to regularly clean-up the sessions |
| maintained by the system, especially if sessions are backed by a persistent data store. |
| <p/> |
| Even in applications that aren't primarily based on a request/response model, |
| such as those that use enterprise asynchronous messaging (where data is pushed to |
| a client without first receiving a client request), it is almost always acceptable to |
| utilize this lazy approach and run this method at defined interval. |
| <p/> |
| Systems that want to proactively validate individual sessions may simply call the |
| <a href="SessionManager.html#getSession(org.apache.shiro.session.mgt.SessionKey)"><code>getSession(SessionKey)</code></a> method on any |
| <code>ValidatingSessionManager</code> instance as that method is expected to |
| validate the session before retrieving it. Note that even with proactive calls to <code>getSession</code>, |
| this <code>validateSessions()</code> method should be invoked regularly anyway to <em>guarantee</em> no |
| orphans exist. |
| <p/> |
| <b>Note:</b> Shiro supports automatic execution of this method at a regular interval |
| by using <a href="SessionValidationScheduler.html" title="interface in org.apache.shiro.session.mgt"><code>SessionValidationScheduler</code></a>s. The Shiro default SecurityManager implementations |
| needing session validation will create and use one by default if one is not provided by the |
| application configuration.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="ValidatingSessionManager.html#validateSessions()">validateSessions</a></code> in interface <code><a href="ValidatingSessionManager.html" title="interface in org.apache.shiro.session.mgt">ValidatingSessionManager</a></code></dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="ValidatingSessionManager.html#validateSessions()"><code>ValidatingSessionManager.validateSessions()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getActiveSessions()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getActiveSessions</h4> |
| <pre class="methodSignature">protected abstract <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util" class="externalLink">Collection</a><<a href="../Session.html" title="interface in org.apache.shiro.session">Session</a>> <a href="../../../../../src-html/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html#line.312">getActiveSessions</a>()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/AbstractValidatingSessionManager.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2004–2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |