Class Session
java.lang.Object
ortus.boxlang.runtime.application.Session
- All Implemented Interfaces:
Serializable
I represent a Session. This will be stored in a BoxLang cache
and will be used to store session data.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasStruct()Get the session state as a struct representationstatic StringbuildCacheKey(Key id, Key applicationName) Build a cache key for a sessionGet the application that this session belongs toGet the cache key for this sessiongetID()Get the ID of this sessionGet the scope for this sessionvoidshutdown(BaseApplicationListener listener) Shutdown the sessionstart(IBoxContext context) Start the session if not already started.toString()Convert to stringvoidUpdate the last visit time
-
Field Details
-
ID_CONCATENATOR
The concatenator for session IDs- See Also:
-
URL_TOKEN_FORMAT
The URL token format MOVE TO COMPAT MODULE- See Also:
-
-
Constructor Details
-
Session
Constructor- Parameters:
ID- The ID of this sessionapplication- The application that this session belongs to
-
-
Method Details
-
buildCacheKey
Build a cache key for a session- Parameters:
id- The ID of the sessionapplicationName- The application name- Returns:
- The cache key
-
updateLastVisit
public void updateLastVisit()Update the last visit time -
start
Start the session if not already started. If it is already started, just update the last visit time- Parameters:
context- The context that is starting the session- Returns:
- This session
-
getID
Get the ID of this session- Returns:
- The ID
-
getSessionScope
Get the scope for this session- Returns:
- The scope
-
getApplicationName
Get the application that this session belongs to- Returns:
- The application name
-
getCacheKey
Get the cache key for this session -
shutdown
Shutdown the session- Parameters:
listener- The listener that is shutting down the session
-
toString
Convert to string -
asStruct
Get the session state as a struct representation
-