- expire
void expire()
Undocumented in source. Be warned that the author may not have intended to support it.
- getAttribute
Object getAttribute(Object key)
Undocumented in source. Be warned that the author may not have intended to support it.
- getAttributeKeys
Object[] getAttributeKeys()
Undocumented in source. Be warned that the author may not have intended to support it.
- getAttributes
Map!(Object, Object) getAttributes()
Undocumented in source. Be warned that the author may not have intended to support it.
- getHost
string getHost()
Undocumented in source. Be warned that the author may not have intended to support it.
- getId
string getId()
Undocumented in source. Be warned that the author may not have intended to support it.
- getLastAccessTime
Date getLastAccessTime()
Undocumented in source. Be warned that the author may not have intended to support it.
- getStartTimestamp
Date getStartTimestamp()
Undocumented in source. Be warned that the author may not have intended to support it.
- getStopTimestamp
Long getStopTimestamp()
Returns the time the session was stopped, or <tt>null</tt> if the session is still active.
<p/>
A session may become stopped under a number of conditions:
<ul>
<li>If the user logs out of the system, their current session is terminated (released).</li>
<li>If the session expires</li>
<li>The application explicitly calls {@link #stop()}</li>
<li>If there is an internal system error and the session state can no longer accurately
reflect the user's behavior, such in the case of a system crash</li>
</ul>
<p/>
Once stopped, a session may no longer be used. It is locked from all further activity.
- getTimeout
long getTimeout()
Undocumented in source. Be warned that the author may not have intended to support it.
- isExpired
bool isExpired()
Returns true if this session has expired, false otherwise. If the session has
expired, no further user interaction with the system may be done under this session.
- isStopped
bool isStopped()
Undocumented in source. Be warned that the author may not have intended to support it.
- isTimedOut
bool isTimedOut()
Determines if this session is expired.
- isValid
bool isValid()
- onEquals
bool onEquals(SimpleSession ss)
Provides an attribute-based comparison (no ID comparison) - incurred <em>only</em> when 'this' or the
session object being compared for equality do not have a session id.
- opEquals
bool opEquals(Object obj)
Returns {@code true} if the specified argument is an {@code instanceof} {@code SimpleSession} and both
{@link #getId() id}s are equal. If the argument is a {@code SimpleSession} and either 'this' or the argument
does not yet have an ID assigned, the value of {@link #onEquals(SimpleSession) onEquals} is returned, which
does a necessary attribute-based comparison when IDs are not available.
<p/>
Do your best to ensure {@code SimpleSession} instances receive an ID very early in their lifecycle to
avoid the more expensive attributes-based comparison.
- removeAttribute
Object removeAttribute(Object key)
Undocumented in source. Be warned that the author may not have intended to support it.
- setAttribute
void setAttribute(Object key, Object value)
Undocumented in source. Be warned that the author may not have intended to support it.
- setAttributes
void setAttributes(Map!(Object, Object) attributes)
Undocumented in source. Be warned that the author may not have intended to support it.
- setExpired
void setExpired(bool expired)
Undocumented in source. Be warned that the author may not have intended to support it.
- setHost
void setHost(string host)
Undocumented in source. Be warned that the author may not have intended to support it.
- setId
void setId(string id)
Undocumented in source. Be warned that the author may not have intended to support it.
- setLastAccessTime
void setLastAccessTime(Date lastAccessTime)
Undocumented in source. Be warned that the author may not have intended to support it.
- setStartTimestamp
void setStartTimestamp(Date startTimestamp)
Undocumented in source. Be warned that the author may not have intended to support it.
- setStopTimestamp
void setStopTimestamp(Long stopTimestamp)
Undocumented in source. Be warned that the author may not have intended to support it.
- setTimeout
void setTimeout(long timeout)
Undocumented in source. Be warned that the author may not have intended to support it.
- stop
void stop()
Undocumented in source. Be warned that the author may not have intended to support it.
- toHash
size_t toHash()
Returns the hashCode. If the {@link #getId() id} is not {@code null}, its hashcode is returned immediately.
If it is {@code null}, an attributes-based hashCode will be calculated and returned.
<p/>
Do your best to ensure {@code SimpleSession} instances receive an ID very early in their lifecycle to
avoid the more expensive attributes-based calculation.
- toString
string toString()
Returns the string representation of this SimpleSession, equal to
<typeid(code).name + ",id=" + getId()</code>.
- touch
void touch()
Undocumented in source. Be warned that the author may not have intended to support it.
- validate
void validate()
Undocumented in source. Be warned that the author may not have intended to support it.
Simple {@link hunt.shiro.session.Session} JavaBeans-compatible POJO implementation, intended to be used on the business/server tier.