Package org.basex.query.func.session
Class ASession
- java.lang.Object
-
- org.basex.query.func.session.ASession
-
public final class ASession extends Object
This module contains functions for processing global sessions.- Author:
- BaseX Team 2005-23, BSD License, Christian Gruen
-
-
Constructor Summary
Constructors Constructor Description ASession(javax.servlet.http.HttpSession session)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Dtmaccessed()Returns the last access time.voidclose()Closes a session.Dtmcreated()Returns the creation time.voiddelete(String key)Removes a session attribute.Objectget(String key)Returns a session attribute.Strid()Returns the session ID.Valuenames()Returns all session attributes.voidset(String name, Value value)Updates a session attribute.
-
-
-
Method Detail
-
id
public Str id()
Returns the session ID.- Returns:
- session id
-
created
public Dtm created()
Returns the creation time.- Returns:
- creation time
-
accessed
public Dtm accessed()
Returns the last access time.- Returns:
- creation time
-
names
public Value names()
Returns all session attributes.- Returns:
- session attributes
-
get
public Object get(String key)
Returns a session attribute.- Parameters:
key- key to be requested- Returns:
- session attribute or
null
-
set
public void set(String name, Value value)
Updates a session attribute.- Parameters:
name- name of the attributevalue- value to be stored
-
delete
public void delete(String key)
Removes a session attribute.- Parameters:
key- key of the attribute
-
close
public void close()
Closes a session.
-
-