blob: 16dedf8543b9e4a3cd9ec5fc65129032fcd2959f [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_65) on Tue Feb 25 18:15:50 EST 2014 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
NativeSessionManager (Apache Shiro 1.2.3 API)
</TITLE>
<META NAME="date" CONTENT="2014-02-25">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="NativeSessionManager (Apache Shiro 1.2.3 API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/NativeSessionManager.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/shiro/session/mgt/ImmutableProxiedSession.html" title="class in org.apache.shiro.session.mgt"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/shiro/session/mgt/SessionContext.html" title="interface in org.apache.shiro.session.mgt"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/shiro/session/mgt/NativeSessionManager.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="NativeSessionManager.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.shiro.session.mgt</FONT>
<BR>
Interface NativeSessionManager</H2>
<DL>
<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../org/apache/shiro/session/mgt/SessionManager.html" title="interface in org.apache.shiro.session.mgt">SessionManager</A></DD>
</DL>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../../org/apache/shiro/session/mgt/AbstractNativeSessionManager.html" title="class in org.apache.shiro.session.mgt">AbstractNativeSessionManager</A>, <A HREF="../../../../../org/apache/shiro/session/mgt/AbstractValidatingSessionManager.html" title="class in org.apache.shiro.session.mgt">AbstractValidatingSessionManager</A>, <A HREF="../../../../../org/apache/shiro/session/mgt/DefaultSessionManager.html" title="class in org.apache.shiro.session.mgt">DefaultSessionManager</A>, <A HREF="../../../../../org/apache/shiro/web/session/mgt/DefaultWebSessionManager.html" title="class in org.apache.shiro.web.session.mgt">DefaultWebSessionManager</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <A HREF="../../../../../src-html/org/apache/shiro/session/mgt/NativeSessionManager.html#line.30"><B>NativeSessionManager</B></A><DT>extends <A HREF="../../../../../org/apache/shiro/session/mgt/SessionManager.html" title="interface in org.apache.shiro.session.mgt">SessionManager</A></DL>
</PRE>
<P>
A <code>Native</code> session manager is one that manages sessions natively - that is, it is directly responsible
for the creation, persistence and removal of <A HREF="../../../../../org/apache/shiro/session/Session.html" title="interface in org.apache.shiro.session"><CODE>Session</CODE></A> instances and their
lifecycles.
<P>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>1.0</DD>
</DL>
<HR>
<P>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/session/mgt/NativeSessionManager.html#checkValid(org.apache.shiro.session.mgt.SessionKey)">checkValid</A></B>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns quietly if the associated session is valid (it exists and is not stopped or expired) or throws
an <A HREF="../../../../../org/apache/shiro/session/InvalidSessionException.html" title="class in org.apache.shiro.session"><CODE>InvalidSessionException</CODE></A> indicating that the session id is invalid.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/session/mgt/NativeSessionManager.html#getAttribute(org.apache.shiro.session.mgt.SessionKey, java.lang.Object)">getAttribute</A></B>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;sessionKey,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;attributeKey)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the object bound to the associated session identified by the specified attribute key.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/session/mgt/NativeSessionManager.html#getAttributeKeys(org.apache.shiro.session.mgt.SessionKey)">getAttributeKeys</A></B>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;sessionKey)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns all attribute keys maintained by the target session or an empty collection if there are no attributes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/session/mgt/NativeSessionManager.html#getHost(org.apache.shiro.session.mgt.SessionKey)">getHost</A></B>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the host name or IP string of the host where the session was started, if known.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/session/mgt/NativeSessionManager.html#getLastAccessTime(org.apache.shiro.session.mgt.SessionKey)">getLastAccessTime</A></B>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the time the associated <code>Session</code> last interacted with the system.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/session/mgt/NativeSessionManager.html#getStartTimestamp(org.apache.shiro.session.mgt.SessionKey)">getStartTimestamp</A></B>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the time the associated <code>Session</code> started (was created).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/session/mgt/NativeSessionManager.html#getTimeout(org.apache.shiro.session.mgt.SessionKey)">getTimeout</A></B>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the time in milliseconds that the associated session may remain idle before expiring.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/session/mgt/NativeSessionManager.html#isValid(org.apache.shiro.session.mgt.SessionKey)">isValid</A></B>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if the associated session is valid (it exists and is not stopped nor expired),
<code>false</code> otherwise.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/session/mgt/NativeSessionManager.html#removeAttribute(org.apache.shiro.session.mgt.SessionKey, java.lang.Object)">removeAttribute</A></B>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;sessionKey,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;attributeKey)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes (unbinds) the object bound to associated <code>Session</code> under the given <code>attributeKey</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/session/mgt/NativeSessionManager.html#setAttribute(org.apache.shiro.session.mgt.SessionKey, java.lang.Object, java.lang.Object)">setAttribute</A></B>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;sessionKey,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;attributeKey,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Binds the specified <code>value</code> to the associated session uniquely identified by the <code>attributeKey</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/session/mgt/NativeSessionManager.html#setTimeout(org.apache.shiro.session.mgt.SessionKey, long)">setTimeout</A></B>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;key,
long&nbsp;maxIdleTimeInMillis)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the time in milliseconds that the associated session may remain idle before expiring.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/session/mgt/NativeSessionManager.html#stop(org.apache.shiro.session.mgt.SessionKey)">stop</A></B>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Explicitly stops the associated session, thereby releasing all of its resources.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/session/mgt/NativeSessionManager.html#touch(org.apache.shiro.session.mgt.SessionKey)">touch</A></B>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Updates the last accessed time of the session identified by <code>sessionId</code>.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.shiro.session.mgt.SessionManager"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface org.apache.shiro.session.mgt.<A HREF="../../../../../org/apache/shiro/session/mgt/SessionManager.html" title="interface in org.apache.shiro.session.mgt">SessionManager</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/shiro/session/mgt/SessionManager.html#getSession(org.apache.shiro.session.mgt.SessionKey)">getSession</A>, <A HREF="../../../../../org/apache/shiro/session/mgt/SessionManager.html#start(org.apache.shiro.session.mgt.SessionContext)">start</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="getStartTimestamp(org.apache.shiro.session.mgt.SessionKey)"><!-- --></A><H3>
getStartTimestamp</H3>
<PRE>
<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</A> <A HREF="../../../../../src-html/org/apache/shiro/session/mgt/NativeSessionManager.html#line.39"><B>getStartTimestamp</B></A>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;key)</PRE>
<DL>
<DD>Returns the time the associated <code>Session</code> started (was created).
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the session key to use to look up the target session.
<DT><B>Returns:</B><DD>the time the specified <code>Session</code> started (was created).<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/shiro/session/Session.html#getStartTimestamp()"><CODE>Session.getStartTimestamp()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getLastAccessTime(org.apache.shiro.session.mgt.SessionKey)"><!-- --></A><H3>
getLastAccessTime</H3>
<PRE>
<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util">Date</A> <A HREF="../../../../../src-html/org/apache/shiro/session/mgt/NativeSessionManager.html#line.49"><B>getLastAccessTime</B></A>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;key)</PRE>
<DL>
<DD>Returns the time the associated <code>Session</code> last interacted with the system.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the session key to use to look up the target session.
<DT><B>Returns:</B><DD>time the session last accessed the system<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/shiro/session/Session.html#getLastAccessTime()"><CODE>Session.getLastAccessTime()</CODE></A>,
<A HREF="../../../../../org/apache/shiro/session/Session.html#touch()"><CODE>Session.touch()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="isValid(org.apache.shiro.session.mgt.SessionKey)"><!-- --></A><H3>
isValid</H3>
<PRE>
boolean <A HREF="../../../../../src-html/org/apache/shiro/session/mgt/NativeSessionManager.html#line.58"><B>isValid</B></A>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;key)</PRE>
<DL>
<DD>Returns <code>true</code> if the associated session is valid (it exists and is not stopped nor expired),
<code>false</code> otherwise.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the session key to use to look up the target session.
<DT><B>Returns:</B><DD><code>true</code> if the session is valid (exists and is not stopped or expired), <code>false</code> otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="checkValid(org.apache.shiro.session.mgt.SessionKey)"><!-- --></A><H3>
checkValid</H3>
<PRE>
void <A HREF="../../../../../src-html/org/apache/shiro/session/mgt/NativeSessionManager.html#line.70"><B>checkValid</B></A>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;key)
throws <A HREF="../../../../../org/apache/shiro/session/InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</A></PRE>
<DL>
<DD>Returns quietly if the associated session is valid (it exists and is not stopped or expired) or throws
an <A HREF="../../../../../org/apache/shiro/session/InvalidSessionException.html" title="class in org.apache.shiro.session"><CODE>InvalidSessionException</CODE></A> indicating that the session id is invalid. This
might be preferred to be used instead of <A HREF="../../../../../org/apache/shiro/session/mgt/NativeSessionManager.html#isValid(org.apache.shiro.session.mgt.SessionKey)"><CODE>isValid(org.apache.shiro.session.mgt.SessionKey)</CODE></A> since any exception thrown will definitively explain
the reason for invalidation.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the session key to use to look up the target session.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/shiro/session/InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</A></CODE> - if the session id is invalid (it does not exist or it is stopped or expired).</DL>
</DD>
</DL>
<HR>
<A NAME="getTimeout(org.apache.shiro.session.mgt.SessionKey)"><!-- --></A><H3>
getTimeout</H3>
<PRE>
long <A HREF="../../../../../src-html/org/apache/shiro/session/mgt/NativeSessionManager.html#line.85"><B>getTimeout</B></A>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;key)
throws <A HREF="../../../../../org/apache/shiro/session/InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</A></PRE>
<DL>
<DD>Returns the time in milliseconds that the associated 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>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the session key to use to look up the target session.
<DT><B>Returns:</B><DD>the time in milliseconds that the associated session may remain idle before expiring.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/shiro/session/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.</DL>
</DD>
</DL>
<HR>
<A NAME="setTimeout(org.apache.shiro.session.mgt.SessionKey, long)"><!-- --></A><H3>
setTimeout</H3>
<PRE>
void <A HREF="../../../../../src-html/org/apache/shiro/session/mgt/NativeSessionManager.html#line.100"><B>setTimeout</B></A>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;key,
long&nbsp;maxIdleTimeInMillis)
throws <A HREF="../../../../../org/apache/shiro/session/InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</A></PRE>
<DL>
<DD>Sets the time in milliseconds that the associated 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>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the session key to use to look up the target session.<DD><CODE>maxIdleTimeInMillis</CODE> - the time in milliseconds that the associated session may remain idle before expiring.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/shiro/session/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.</DL>
</DD>
</DL>
<HR>
<A NAME="touch(org.apache.shiro.session.mgt.SessionKey)"><!-- --></A><H3>
touch</H3>
<PRE>
void <A HREF="../../../../../src-html/org/apache/shiro/session/mgt/NativeSessionManager.html#line.111"><B>touch</B></A>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;key)
throws <A HREF="../../../../../org/apache/shiro/session/InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</A></PRE>
<DL>
<DD>Updates the last accessed time of the session identified by <code>sessionId</code>. This
can be used to explicitly ensure that a session does not time out.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the session key to use to look up the target session.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/shiro/session/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.<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/shiro/session/Session.html#touch()"><CODE>Session.touch()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getHost(org.apache.shiro.session.mgt.SessionKey)"><!-- --></A><H3>
getHost</H3>
<PRE>
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/shiro/session/mgt/NativeSessionManager.html#line.121"><B>getHost</B></A>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;key)</PRE>
<DL>
<DD>Returns the host name or IP string of the host where the session was started, if known. If
no host name or IP was specified when starting the session, this method returns <code>null</code>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the session key to use to look up the target session.
<DT><B>Returns:</B><DD>the host name or ip address of the host where the session originated, if known. If unknown,
this method returns <code>null</code>.</DL>
</DD>
</DL>
<HR>
<A NAME="stop(org.apache.shiro.session.mgt.SessionKey)"><!-- --></A><H3>
stop</H3>
<PRE>
void <A HREF="../../../../../src-html/org/apache/shiro/session/mgt/NativeSessionManager.html#line.130"><B>stop</B></A>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;key)
throws <A HREF="../../../../../org/apache/shiro/session/InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</A></PRE>
<DL>
<DD>Explicitly stops the associated session, thereby releasing all of its resources.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the session key to use to look up the target session.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/shiro/session/InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</A></CODE> - if the session has stopped or expired prior to calling this method.<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/shiro/session/Session.html#stop()"><CODE>Session.stop()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getAttributeKeys(org.apache.shiro.session.mgt.SessionKey)"><!-- --></A><H3>
getAttributeKeys</H3>
<PRE>
<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&gt; <A HREF="../../../../../src-html/org/apache/shiro/session/mgt/NativeSessionManager.html#line.140"><B>getAttributeKeys</B></A>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;sessionKey)</PRE>
<DL>
<DD>Returns all attribute keys maintained by the target session or an empty collection if there are no attributes.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sessionKey</CODE> - the session key to use to look up the target session.
<DT><B>Returns:</B><DD>all attribute keys maintained by the target session or an empty collection if there are no attributes.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/shiro/session/InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</A></CODE> - if the associated session has stopped or expired prior to calling this method.<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/shiro/session/Session.html#getAttributeKeys()"><CODE>Session.getAttributeKeys()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getAttribute(org.apache.shiro.session.mgt.SessionKey, java.lang.Object)"><!-- --></A><H3>
getAttribute</H3>
<PRE>
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <A HREF="../../../../../src-html/org/apache/shiro/session/mgt/NativeSessionManager.html#line.152"><B>getAttribute</B></A>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;sessionKey,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;attributeKey)
throws <A HREF="../../../../../org/apache/shiro/session/InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</A></PRE>
<DL>
<DD>Returns the object bound to the associated session identified by the specified attribute key. If there
is no object bound under the attribute key for the given session, <code>null</code> is returned.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sessionKey</CODE> - session key to use to look up the target session.<DD><CODE>attributeKey</CODE> - the unique name of the object bound to the associated session
<DT><B>Returns:</B><DD>the object bound under the <code>attributeKey</code> or <code>null</code> if there is no object bound.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/shiro/session/InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</A></CODE> - if the specified session has stopped or expired prior to calling this method.<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/shiro/session/Session.html#getAttribute(java.lang.Object)"><CODE>Session.getAttribute(Object key)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setAttribute(org.apache.shiro.session.mgt.SessionKey, java.lang.Object, java.lang.Object)"><!-- --></A><H3>
setAttribute</H3>
<PRE>
void <A HREF="../../../../../src-html/org/apache/shiro/session/mgt/NativeSessionManager.html#line.168"><B>setAttribute</B></A>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;sessionKey,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;attributeKey,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)
throws <A HREF="../../../../../org/apache/shiro/session/InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</A></PRE>
<DL>
<DD>Binds the specified <code>value</code> to the associated session uniquely identified by the <code>attributeKey</code>.
If there is already a session attribute bound under the <code>attributeKey</code>, 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 the
<A HREF="../../../../../org/apache/shiro/session/mgt/NativeSessionManager.html#removeAttribute(org.apache.shiro.session.mgt.SessionKey, java.lang.Object)"><CODE>removeAttribute(SessionKey sessionKey, Object attributeKey)</CODE></A> method was called.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sessionKey</CODE> - the session key to use to look up the target session.<DD><CODE>attributeKey</CODE> - the key under which the <code>value</code> object will be bound in this session<DD><CODE>value</CODE> - the object to bind in this session.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/shiro/session/InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</A></CODE> - if the specified session has stopped or expired prior to calling this method.<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/shiro/session/Session.html#setAttribute(java.lang.Object, java.lang.Object)"><CODE>Session.setAttribute(Object key, Object value)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="removeAttribute(org.apache.shiro.session.mgt.SessionKey, java.lang.Object)"><!-- --></A><H3>
removeAttribute</H3>
<PRE>
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <A HREF="../../../../../src-html/org/apache/shiro/session/mgt/NativeSessionManager.html#line.179"><B>removeAttribute</B></A>(<A HREF="../../../../../org/apache/shiro/session/mgt/SessionKey.html" title="interface in org.apache.shiro.session.mgt">SessionKey</A>&nbsp;sessionKey,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;attributeKey)
throws <A HREF="../../../../../org/apache/shiro/session/InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</A></PRE>
<DL>
<DD>Removes (unbinds) the object bound to associated <code>Session</code> under the given <code>attributeKey</code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sessionKey</CODE> - session key to use to look up the target session.<DD><CODE>attributeKey</CODE> - the key uniquely identifying the object to remove
<DT><B>Returns:</B><DD>the object removed or <code>null</code> if there was no object bound under the specified <code>attributeKey</code>.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/shiro/session/InvalidSessionException.html" title="class in org.apache.shiro.session">InvalidSessionException</A></CODE> - if the specified session has stopped or expired prior to calling this method.<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/shiro/session/Session.html#removeAttribute(java.lang.Object)"><CODE>Session.removeAttribute(Object key)</CODE></A></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/NativeSessionManager.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/shiro/session/mgt/ImmutableProxiedSession.html" title="class in org.apache.shiro.session.mgt"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/shiro/session/mgt/SessionContext.html" title="interface in org.apache.shiro.session.mgt"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/shiro/session/mgt/NativeSessionManager.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="NativeSessionManager.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright &#169; 2004-2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>