Weaver 3.1.0a1-D1

com.oldlight.weaver.context
Interface WeaverSessionContext

All Known Implementing Classes:
WeaverSessionContextImpl

public interface WeaverSessionContext

The WeaverSessionContext interface manages a browser session.

Author:
Paul Harvey

Method Summary
 Object getAttribute(String name)
          Get a named session scoped attribute
 long getCreationTime()
          Gets the time that this session was created.
 long getLastAccessedTime()
          Get the last time that a request was made in this session.
 long getMaxInactiveInterval()
          Get the maximum time between requests before this session will time out.
 WeaverSecurityContext getSecurityContext()
          Gets the security context for this session
 String getSessionID()
          Get the ID of this session.
 void invalidate()
          Invalidates this session.
 void removeAttribute(String name)
          Remove a session scoped attribute.
 void setAttribute(String name, Object value)
          Set the value of a named session scoped attribute.
 

Method Detail

getSecurityContext

public WeaverSecurityContext getSecurityContext()
Gets the security context for this session

Returns:
The security context.

getAttribute

public Object getAttribute(String name)
Get a named session scoped attribute

Parameters:
name - The name of the attribute to retrieve.
Returns:
The named attribute, or null if the attribute cannot be found.

setAttribute

public void setAttribute(String name,
                         Object value)
Set the value of a named session scoped attribute.

Parameters:
name - The name of the attribute to set.
value - The value to set the attribute to.

removeAttribute

public void removeAttribute(String name)
Remove a session scoped attribute.

Parameters:
name - The name of the attribute to remove.

getLastAccessedTime

public long getLastAccessedTime()
Get the last time that a request was made in this session.

Returns:
The last time that a request was made in this session.

getSessionID

public String getSessionID()
Get the ID of this session.

Returns:
The requested session ID.

invalidate

public void invalidate()
Invalidates this session.


getCreationTime

public long getCreationTime()
Gets the time that this session was created.

Returns:
The session creation time.

getMaxInactiveInterval

public long getMaxInactiveInterval()
Get the maximum time between requests before this session will time out.

Returns:
The request time.

Copyright ©Paul Harvey