|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.shiro.session.ProxiedSession
public class ProxiedSession
Simple Session
implementation that immediately delegates all corresponding calls to an
underlying proxied session instance.
Session
calls
and perform additional logic.
Field Summary | |
---|---|
protected Session |
delegate
The proxied instance |
Constructor Summary | |
---|---|
ProxiedSession(Session target)
Constructs an instance that proxies the specified target . |
Method Summary | |
---|---|
Object |
getAttribute(Object key)
Immediately delegates to the underlying proxied session. |
Collection<Object> |
getAttributeKeys()
Immediately delegates to the underlying proxied session. |
String |
getHost()
Immediately delegates to the underlying proxied session. |
Serializable |
getId()
Immediately delegates to the underlying proxied session. |
Date |
getLastAccessTime()
Immediately delegates to the underlying proxied session. |
Date |
getStartTimestamp()
Immediately delegates to the underlying proxied session. |
long |
getTimeout()
Immediately delegates to the underlying proxied session. |
Object |
removeAttribute(Object key)
Immediately delegates to the underlying proxied session. |
void |
setAttribute(Object key,
Object value)
Immediately delegates to the underlying proxied session. |
void |
setTimeout(long maxIdleTimeInMillis)
Immediately delegates to the underlying proxied session. |
void |
stop()
Immediately delegates to the underlying proxied session. |
void |
touch()
Immediately delegates to the underlying proxied session. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Session delegate
Constructor Detail |
---|
public ProxiedSession(Session target)
target
. Subclasses may access this
target via the protected final 'delegate'
attribute, i.e. this.delegate
.
target
- the specified target Session
to proxy.Method Detail |
---|
public Serializable getId()
getId
in interface Session
public Date getStartTimestamp()
getStartTimestamp
in interface Session
public Date getLastAccessTime()
getLastAccessTime
in interface Session
Session.touch()
public long getTimeout() throws InvalidSessionException
getTimeout
in interface Session
InvalidSessionException
- if the session has been stopped or expired prior to calling this method.public void setTimeout(long maxIdleTimeInMillis) throws InvalidSessionException
setTimeout
in interface Session
maxIdleTimeInMillis
- the time in milliseconds that the session may remain idle before expiring.
InvalidSessionException
- if the session has been stopped or expired prior to calling this method.public String getHost()
getHost
in interface Session
null
if the host address is unknown.public void touch() throws InvalidSessionException
touch
in interface Session
InvalidSessionException
- if this session has stopped or expired prior to calling this method.public void stop() throws InvalidSessionException
stop
in interface Session
InvalidSessionException
- if this session has stopped or expired prior to calling this method.public Collection<Object> getAttributeKeys() throws InvalidSessionException
getAttributeKeys
in interface Session
InvalidSessionException
- if this session has stopped or expired prior to calling this method.public Object getAttribute(Object key) throws InvalidSessionException
getAttribute
in interface Session
key
- the unique name of the object bound to this session
key
name or null
if there is
no object bound under that name.
InvalidSessionException
- if this session has stopped or expired prior to calling
this method.public void setAttribute(Object key, Object value) throws InvalidSessionException
setAttribute
in interface Session
key
- the name under which the value
object will be bound in this sessionvalue
- the object to bind in this session.
InvalidSessionException
- if this session has stopped or expired prior to calling
this method.public Object removeAttribute(Object key) throws InvalidSessionException
removeAttribute
in interface Session
key
- the name uniquely identifying the object to remove
null
if there was no object bound under the name
key
.
InvalidSessionException
- if this session has stopped or expired prior to calling
this method.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |