Skip to main content

HS.Util.SessionData.SessionEvents

class HS.Util.SessionData.SessionEvents extends %CSP.SessionEvents

Method Inventory

Parameters

parameter ALWAYSCREATESESSION = 1;
Subclasses may override this value if they wish to manually control the creation of a Session, or should override GetCreationFlag()() to implement more nuanced logic.
parameter DELETEEXISTINGSESSION = 1;
Subclasses may override this value if they wish to prevent an existing session with the same ID from being deleted. If the API call returns an error, the current session will be ended.
parameter REASONEND = end;
Parameter that controls the string used to indicate the session has ended.
parameter REASONLOGOUT = logout;
Parameter that controls the string used to indicate the user logged out.
parameter REASONTIMEOUT = timeout;
Parameter that controls the string used to indicate that the session timed out.
parameter SESSIONAPPLICATION;
Subclasses must either override this parameter OR override GetApplication()() to ensure that a session application is returned.
parameter SESSIONCLASS = HS.Util.SessionData.Session;
Subclasses may override this parameter to specify an alternative Session class.

Methods

classmethod GetApplication() as %String
Subclasses may override this method to return a dynamic application name. The default value is defined by the SESSIONAPPLICATION parameter. If no application is specified, no session will be created.
classmethod GetCreationFlag() as %Boolean
Subclasses may override this method to use an alternative mechanism for determining whether a Session object should be created.
classmethod GetSessionID() as %String
Subclasses may override this method to return an application-specific session ID. The default implementation is to return the CSP Session ID.
final classmethod GetSessionIdentifiers(Output pApplication As %String, Output pSessionID As %String)
classmethod OnEndSession()
Called when the session is about to be deleted, either because of a timeout (in which case OnTimeout() is called first) or because the application has explicitly closed this session. Use the %session object to examine this session. If you wish to abort this deletion then:
  Set %session.EndSession=0
  
classmethod OnLogout() as %Status
Called when a logout. The current authentication for the session is invalidated. occurs that changed the $username or the roles this user is running with. If this returns an error status then the logout will be stopped. If you wish to end the session after the logout then:
  Set %session.EndSession=1
  
final classmethod OnStartSession()
Called when a new session is created and its values are initialised.

This is called before the license for this session is allocated, and if you wish to abort this session and return the standard out of licenses error page then:

  Set %session.EndSession=1
  
classmethod OnTimeout()
Called when the CSP Daemon times out out this session before calling EndSession(). Use the %session object to examine this session. If you wish to abort this deletion then:
  Set %session.EndSession=0
  

Inherited Members

Inherited Methods

Subclasses

FeedbackOpens in a new tab