Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [ENSLIB] >  [%CSP] >  [SessionEvents]
Private  Storage   

abstract class %CSP.SessionEvents extends %RegisteredObject

Abstract class which defines the interfaces that are called during the lifetime of a %CSP.Session object. In order to use this you should subclass this and implement the method code you wish to be executed. Then within the CSP application configuration set the event class to the class you have created.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
8


Summary

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetModified %ValidateObject
OnApplicationChange OnEndRequest OnEndSession OnLogin
OnLogout OnStartRequest OnStartSession OnTimeout

Subclasses
%CSP.StudioTemplateEvent %ZEN.SessionEvents CSPX.SessionEventHandler EnsPortal.SessionEvents

Methods

• classmethod OnApplicationChange(oldapp As %String, newapp As %String) as %Status
Called when a session that was in CSP application oldapp is now going to run a page in CSP application newapp. If this returns an error value then instead of running the page in the new application it will redirect to the error page (error page looked up from old application).
• classmethod OnEndRequest() as %Status
Called when we have finished processing this request
• 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 OnLogin() as %Status
Called when a login occurs that changed the $username or the roles this user is running with. If this returns an error status then this is reported via the standard error page.
• 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
• classmethod OnStartRequest() as %Status
Called when we start getting data from the CSP gateway for a request
• 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


Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.