| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>DelegatingSession (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="DelegatingSession (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":10,"i8":10,"i9":10,"i10":10,"i11":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance 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/DelegatingSession.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>Field | </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>Field | </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 DelegatingSession" class="title">Class DelegatingSession</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>org.apache.shiro.session.mgt.DelegatingSession</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a></code>, <code><a href="../Session.html" title="interface in org.apache.shiro.session">Session</a></code></dd> |
| </dl> |
| <hr> |
| <pre>public class <a href="../../../../../src-html/org/apache/shiro/session/mgt/DelegatingSession.html#line.43">DelegatingSession</a> |
| extends <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> |
| implements <a href="../Session.html" title="interface in org.apache.shiro.session">Session</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a></pre> |
| <div class="block">A DelegatingSession is a client-tier representation of a server side |
| <a href="../Session.html" title="interface in org.apache.shiro.session"><code>Session</code></a>. |
| This implementation is basically a proxy to a server-side <a href="NativeSessionManager.html" title="interface in org.apache.shiro.session.mgt"><code>NativeSessionManager</code></a>, |
| which will return the proper results for each method call. |
| <p/> |
| <p>A <tt>DelegatingSession</tt> will cache data when appropriate to avoid a remote method invocation, |
| only communicating with the server when necessary. |
| <p/> |
| <p>Of course, if used in-process with a NativeSessionManager business POJO, as might be the case in a |
| web-based application where the web classes and server-side business pojos exist in the same |
| JVM, a remote method call will not be incurred.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.1</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../serialized-form.html#org.apache.shiro.session.mgt.DelegatingSession">Serialized Form</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== 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(org.apache.shiro.session.mgt.NativeSessionManager,org.apache.shiro.session.mgt.SessionKey)">DelegatingSession</a></span>​(<a href="NativeSessionManager.html" title="interface in org.apache.shiro.session.mgt">NativeSessionManager</a> sessionManager, |
| <a href="SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</a> key)</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="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><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></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAttribute(java.lang.Object)">getAttribute</a></span>​(<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> attributeKey)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the object bound to this session identified by the specified key.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><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="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>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAttributeKeys()">getAttributeKeys</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the keys of all the attributes stored under this session.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getHost()">getHost</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the host name or IP string of the host that originated this session, or <code>null</code> |
| if the host is unknown.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getId()">getId</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the unique identifier assigned by the system upon session creation.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util" class="externalLink">Date</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLastAccessTime()">getLastAccessTime</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the last time the application received a request or method invocation from the user associated |
| with this session.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util" class="externalLink">Date</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getStartTimestamp()">getStartTimestamp</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the time the session was started; that is, the time the system created the instance.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTimeout()">getTimeout</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the time in milliseconds that the session session may remain idle before expiring.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><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></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#removeAttribute(java.lang.Object)">removeAttribute</a></span>​(<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> attributeKey)</code></th> |
| <td class="colLast"> |
| <div class="block">Removes (unbinds) the object bound to this session under the specified <code>key</code> name.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAttribute(java.lang.Object,java.lang.Object)">setAttribute</a></span>​(<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> attributeKey, |
| <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> value)</code></th> |
| <td class="colLast"> |
| <div class="block">Binds the specified <code>value</code> to this session, uniquely identified by the specified |
| <code>key</code> name.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setTimeout(long)">setTimeout</a></span>​(long maxIdleTimeInMillis)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets the time in milliseconds that the session may remain idle before expiring.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#stop()">stop</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Explicitly stops (invalidates) this session and releases all associated resources.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#touch()">touch</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Explicitly updates the <a href="../Session.html#getLastAccessTime()"><code>lastAccessTime</code></a> of this session to the current time when |
| this method is invoked.</div> |
| </td> |
| </tr> |
| </table> |
| <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> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a id="<init>(org.apache.shiro.session.mgt.NativeSessionManager,org.apache.shiro.session.mgt.SessionKey)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>DelegatingSession</h4> |
| <pre>public <a href="../../../../../src-html/org/apache/shiro/session/mgt/DelegatingSession.html#line.59">DelegatingSession</a>​(<a href="NativeSessionManager.html" title="interface in org.apache.shiro.session.mgt">NativeSessionManager</a> sessionManager, |
| <a href="SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</a> key)</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="getId()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getId</h4> |
| <pre class="methodSignature">public <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a> <a href="../../../../../src-html/org/apache/shiro/session/mgt/DelegatingSession.html#line.79">getId</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../Session.html#getId()">Session</a></code></span></div> |
| <div class="block">Returns the unique identifier assigned by the system upon session creation. |
| <p/> |
| All return values from this method are expected to have proper <code>toString()</code>, |
| <code>equals()</code>, and <code>hashCode()</code> implementations. Good candidates for such |
| an identifier are <a href="https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>UUID</code></a>s, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Integer</code></a>s, and |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>String</code></a>s.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../Session.html#getId()">getId</a></code> in interface <code><a href="../Session.html" title="interface in org.apache.shiro.session">Session</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The unique identifier assigned to the session upon creation.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../Session.html#getId()"><code>Session.getId()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getStartTimestamp()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getStartTimestamp</h4> |
| <pre class="methodSignature">public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util" class="externalLink">Date</a> <a href="../../../../../src-html/org/apache/shiro/session/mgt/DelegatingSession.html#line.86">getStartTimestamp</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../Session.html#getStartTimestamp()">Session</a></code></span></div> |
| <div class="block">Returns the time the session was started; that is, the time the system created the instance.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../Session.html#getStartTimestamp()">getStartTimestamp</a></code> in interface <code><a href="../Session.html" title="interface in org.apache.shiro.session">Session</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The time the system created the session.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../Session.html#getStartTimestamp()"><code>Session.getStartTimestamp()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getLastAccessTime()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLastAccessTime</h4> |
| <pre class="methodSignature">public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util" class="externalLink">Date</a> <a href="../../../../../src-html/org/apache/shiro/session/mgt/DelegatingSession.html#line.96">getLastAccessTime</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../Session.html#getLastAccessTime()">Session</a></code></span></div> |
| <div class="block">Returns the last time the application received a request or method invocation from the user associated |
| with this session. Application calls to this method do not affect this access time.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../Session.html#getLastAccessTime()">getLastAccessTime</a></code> in interface <code><a href="../Session.html" title="interface in org.apache.shiro.session">Session</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The time the user last interacted with the system.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../Session.html#getLastAccessTime()"><code>Session.getLastAccessTime()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getTimeout()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTimeout</h4> |
| <pre class="methodSignature">public long <a href="../../../../../src-html/org/apache/shiro/session/mgt/DelegatingSession.html#line.101">getTimeout</a>() |
| throws <a href="../InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</a></pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../Session.html#getTimeout()">Session</a></code></span></div> |
| <div class="block">Returns the time in milliseconds that the session session may remain idle before expiring. |
| <ul> |
| <li>A negative return value means the session will never expire.</li> |
| <li>A non-negative return value (0 or greater) means the session expiration will occur if idle for that |
| length of time.</li> |
| </ul> |
| <b>*Note:</b> if you are used to the <code>HttpSession</code>'s <code>getMaxInactiveInterval()</code> method, the scale on |
| this method is different: Shiro Sessions use millisecond values for timeout whereas |
| <code>HttpSession.getMaxInactiveInterval</code> uses seconds. Always use millisecond values with Shiro sessions.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../Session.html#getTimeout()">getTimeout</a></code> in interface <code><a href="../Session.html" title="interface in org.apache.shiro.session">Session</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the time in milliseconds the session may remain idle before expiring.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</a></code> - if the session has been stopped or expired prior to calling this method.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setTimeout(long)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setTimeout</h4> |
| <pre class="methodSignature">public void <a href="../../../../../src-html/org/apache/shiro/session/mgt/DelegatingSession.html#line.105">setTimeout</a>​(long maxIdleTimeInMillis) |
| throws <a href="../InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</a></pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../Session.html#setTimeout(long)">Session</a></code></span></div> |
| <div class="block">Sets the time in milliseconds that the session may remain idle before expiring. |
| <ul> |
| <li>A negative value means the session will never expire.</li> |
| <li>A non-negative value (0 or greater) means the session expiration will occur if idle for that |
| length of time.</li> |
| </ul> |
| <p/> |
| <b>*Note:</b> if you are used to the <code>HttpSession</code>'s <code>getMaxInactiveInterval()</code> method, the scale on |
| this method is different: Shiro Sessions use millisecond values for timeout whereas |
| <code>HttpSession.getMaxInactiveInterval</code> uses seconds. Always use millisecond values with Shiro sessions.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../Session.html#setTimeout(long)">setTimeout</a></code> in interface <code><a href="../Session.html" title="interface in org.apache.shiro.session">Session</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>maxIdleTimeInMillis</code> - the time in milliseconds that the session may remain idle before expiring.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</a></code> - if the session has been stopped or expired prior to calling this method.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getHost()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getHost</h4> |
| <pre class="methodSignature">public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> <a href="../../../../../src-html/org/apache/shiro/session/mgt/DelegatingSession.html#line.109">getHost</a>()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../Session.html#getHost()">Session</a></code></span></div> |
| <div class="block">Returns the host name or IP string of the host that originated this session, or <code>null</code> |
| if the host is unknown.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../Session.html#getHost()">getHost</a></code> in interface <code><a href="../Session.html" title="interface in org.apache.shiro.session">Session</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the host name or IP string of the host that originated this session, or <code>null</code> |
| if the host address is unknown.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="touch()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>touch</h4> |
| <pre class="methodSignature">public void <a href="../../../../../src-html/org/apache/shiro/session/mgt/DelegatingSession.html#line.119">touch</a>() |
| throws <a href="../InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</a></pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../Session.html#touch()">Session</a></code></span></div> |
| <div class="block">Explicitly updates the <a href="../Session.html#getLastAccessTime()"><code>lastAccessTime</code></a> of this session to the current time when |
| this method is invoked. This method can be used to ensure a session does not time out. |
| <p/> |
| Most programmers won't use this method directly and will instead rely on the last access time to be updated |
| automatically as a result of an incoming web request or remote procedure call/method invocation. |
| <p/> |
| However, this method is particularly useful when supporting rich-client applications such as |
| Java Web Start app, Java or Flash applets, etc. Although rare, it is possible in a rich-client |
| environment that a user continuously interacts with the client-side application without a |
| server-side method call ever being invoked. If this happens over a long enough period of |
| time, the user's server-side session could time-out. Again, such cases are rare since most |
| rich-clients frequently require server-side method invocations. |
| <p/> |
| In this example though, the user's session might still be considered valid because |
| the user is actively "using" the application, just not communicating with the |
| server. But because no server-side method calls are invoked, there is no way for the server |
| to know if the user is sitting idle or not, so it must assume so to maintain session |
| integrity. This <code>touch()</code> method could be invoked by the rich-client application code during those |
| times to ensure that the next time a server-side method is invoked, the invocation will not |
| throw an <a href="../ExpiredSessionException.html" title="class in org.apache.shiro.session"><code>ExpiredSessionException</code></a>. In short terms, it could be used periodically |
| to ensure a session does not time out. |
| <p/> |
| How often this rich-client "maintenance" might occur is entirely dependent upon |
| the application and would be based on variables such as session timeout configuration, |
| usage characteristics of the client application, network utilization and application server |
| performance.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../Session.html#touch()">touch</a></code> in interface <code><a href="../Session.html" title="interface in org.apache.shiro.session">Session</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> - if this session has stopped or expired prior to calling this method.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../Session.html#touch()"><code>Session.touch()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="stop()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>stop</h4> |
| <pre class="methodSignature">public void <a href="../../../../../src-html/org/apache/shiro/session/mgt/DelegatingSession.html#line.126">stop</a>() |
| throws <a href="../InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</a></pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../Session.html#stop()">Session</a></code></span></div> |
| <div class="block">Explicitly stops (invalidates) this session and releases all associated resources. |
| <p/> |
| If this session has already been authenticated (i.e. the <code>Subject</code> that |
| owns this session has logged-in), calling this method explicitly might have undesired side effects: |
| <p/> |
| It is common for a <code>Subject</code> implementation to retain authentication state in the |
| <code>Session</code>. If the session |
| is explicitly stopped by application code by calling this method directly, it could clear out any |
| authentication state that might exist, thereby effectively "unauthenticating" the <code>Subject</code>. |
| <p/> |
| As such, you might consider <a href="../../subject/Subject.html#logout()"><code>logging-out</code></a> the 'owning' |
| <code>Subject</code> instead of manually calling this method, as a log out is expected to stop the |
| corresponding session automatically, and also allows framework code to execute additional cleanup logic.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../Session.html#stop()">stop</a></code> in interface <code><a href="../Session.html" title="interface in org.apache.shiro.session">Session</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> - if this session has stopped or expired prior to calling this method.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../Session.html#stop()"><code>Session.stop()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getAttributeKeys()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAttributeKeys</h4> |
| <pre class="methodSignature">public <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="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>> <a href="../../../../../src-html/org/apache/shiro/session/mgt/DelegatingSession.html#line.133">getAttributeKeys</a>() |
| throws <a href="../InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</a></pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../Session.html#getAttributeKeys()">Session</a></code></span></div> |
| <div class="block">Returns the keys of all the attributes stored under this session. If there are no |
| attributes, this returns an empty collection.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../Session.html#getAttributeKeys()">getAttributeKeys</a></code> in interface <code><a href="../Session.html" title="interface in org.apache.shiro.session">Session</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the keys of all attributes stored under this session, or an empty collection if |
| there are no session attributes.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</a></code> - if this session has stopped or expired prior to calling this method.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../Session.html#getAttributeKeys()"><code>Session.getAttributeKeys()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getAttribute(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAttribute</h4> |
| <pre class="methodSignature">public <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> <a href="../../../../../src-html/org/apache/shiro/session/mgt/DelegatingSession.html#line.140">getAttribute</a>​(<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> attributeKey) |
| throws <a href="../InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</a></pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../Session.html#getAttribute(java.lang.Object)">Session</a></code></span></div> |
| <div class="block">Returns the object bound to this session identified by the specified key. If there is no |
| object bound under the key, <code>null</code> is returned.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../Session.html#getAttribute(java.lang.Object)">getAttribute</a></code> in interface <code><a href="../Session.html" title="interface in org.apache.shiro.session">Session</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>attributeKey</code> - the unique name of the object bound to this session</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the object bound under the specified <code>key</code> name or <code>null</code> if there is |
| no object bound under that name.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</a></code> - if this session has stopped or expired prior to calling |
| this method.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../Session.html#getAttribute(java.lang.Object)"><code>Session.getAttribute(Object key)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setAttribute(java.lang.Object,java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setAttribute</h4> |
| <pre class="methodSignature">public void <a href="../../../../../src-html/org/apache/shiro/session/mgt/DelegatingSession.html#line.147">setAttribute</a>​(<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> attributeKey, |
| <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> value) |
| throws <a href="../InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</a></pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../Session.html#setAttribute(java.lang.Object,java.lang.Object)">Session</a></code></span></div> |
| <div class="block">Binds the specified <code>value</code> to this session, uniquely identified by the specified |
| <code>key</code> name. If there is already an object bound under the <code>key</code> name, that |
| existing object will be replaced by the new <code>value</code>. |
| <p/> |
| If the <code>value</code> parameter is null, it has the same effect as if |
| <a href="../Session.html#removeAttribute(java.lang.Object)"><code>removeAttribute</code></a> was called.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../Session.html#setAttribute(java.lang.Object,java.lang.Object)">setAttribute</a></code> in interface <code><a href="../Session.html" title="interface in org.apache.shiro.session">Session</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>attributeKey</code> - the name under which the <code>value</code> object will be bound in this session</dd> |
| <dd><code>value</code> - the object to bind in this session.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</a></code> - if this session has stopped or expired prior to calling |
| this method.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../Session.html#setAttribute(java.lang.Object,java.lang.Object)"><code>Session.setAttribute(Object key, Object value)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="removeAttribute(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>removeAttribute</h4> |
| <pre class="methodSignature">public <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> <a href="../../../../../src-html/org/apache/shiro/session/mgt/DelegatingSession.html#line.158">removeAttribute</a>​(<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> attributeKey) |
| throws <a href="../InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</a></pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../Session.html#removeAttribute(java.lang.Object)">Session</a></code></span></div> |
| <div class="block">Removes (unbinds) the object bound to this session under the specified <code>key</code> name.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../Session.html#removeAttribute(java.lang.Object)">removeAttribute</a></code> in interface <code><a href="../Session.html" title="interface in org.apache.shiro.session">Session</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>attributeKey</code> - the name uniquely identifying the object to remove</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the object removed or <code>null</code> if there was no object bound under the name |
| <code>key</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> - if this session has stopped or expired prior to calling |
| this method.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../Session.html#removeAttribute(java.lang.Object)"><code>Session.removeAttribute(Object key)</code></a></dd> |
| </dl> |
| </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/DelegatingSession.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>Field | </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>Field | </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> |