The Session object represents the user session associated with the current Cocoon request.
It provides the following functions and properties:
Function [Object] getAttribute([String] name)
Get the value of the session attribute with the specified name.
Function setAttribute([String] name, [Object] value)
Set the value of the session attribute with the specified name to value.
Function removeAttribute([String] name)
Remove the session attribute with the specified name.
Invalidate this session, releasing all resources associated with it.
Function [Boolean] isNew()
Function [String] getId()
Returns the unique id associated with this session.
Function [Number] getCreationTime()
Returns the time when this session was created, measured in milliseconds since midnight January 1, 1970 GMT.
Function [Number] getLastAccessedTime()
Returns the last time the client sent a request associated with this session, as the number of milliseconds since midnight January 1, 1970 GMT.
Function setMaxInactiveInterval([Number] interval)
Specifies the time, in seconds, between client requests before the contextcontainer will invalidate this session. A negative time indicates the session should never timeout.
Function [Number] getMaxInactiveInterval()
Returns the maximum time interval, in seconds, that the context container will keep this session open between client accesses. After this interval, the context container will invalidate the session. The maximum time interval can be set with the setMaxInactiveInterval method. A negative time indicates the session should never timeout.
Session properties map to session attributes, i.e. session.blah is equivalent to session.getAttribute("blah").