TROSession
Overview
The TROSession class represents an individual user session within the Session Management system of Remoting SDK.
Use Cases
You will usually work with this class via the TRORemoteDataModule.Session property to access the current user's session.
Location
- Unit: uROSessions.pas
- Ancestry: TROSession
constructor Create virtual
Creates a new instance.
constructor Create(const aSessionID: TGUID)
Parameters:
- aSessionID: Session ID
AreValuesChanged
property AreValuesChanged: Boolean read write
Count
Returns the number of Values contained in the session.
property Count: Integer read
Created
Returns the date and time when the session was originally created.
property Created: TDateTime read write
GetKeys protected virtual
function GetKeys: TROSessionKeys
Keys
property Keys: TROSessionKeys read
LastAccessed
Holds the date and time when the session was last accessed. This value will be used in combination with the session manager's SessionDuration property to determine if a session has expired.
property LastAccessed: TDateTime read write
LoadFromStream virtual
Loads data from stream.
procedure LoadFromStream(Source: TStream; OnlyValues: Boolean)
Parameters:
- Source: Stream
- OnlyValues: Loads name=value pair only
Remove
Removes specified value from session
procedure Remove(const Name: string)
Parameters:
- Name: name
Roles
This property gives access to the roles associated to this session; these are checked when services or methods have their Roles property set in the Service Builder.
property Roles: TStringArray read write
SaveStruct
Allows to save struct to session
procedure SaveStruct(aStruct: TROComplexType)
Parameters:
- aStruct: struct
SaveToStream virtual
Saves data to stream.
procedure SaveToStream(Dest: TStream; OnlyValues: Boolean)
Parameters:
- Dest: Stream
- OnlyValues: Saves name=value pair only
SessionID
Contains the ID that uniquely identifies the session, and matches the ClientID received from the user.
property SessionID: TGUID read
Values
This indexer property gives access to the values stored in the session by name.
property Values[Name: string]: Variant read write
AreValuesChanged
property AreValuesChanged: Boolean read write
Count
Returns the number of Values contained in the session.
property Count: Integer read
Created
Returns the date and time when the session was originally created.
property Created: TDateTime read write
Keys
property Keys: TROSessionKeys read
LastAccessed
Holds the date and time when the session was last accessed. This value will be used in combination with the session manager's SessionDuration property to determine if a session has expired.
property LastAccessed: TDateTime read write
Roles
This property gives access to the roles associated to this session; these are checked when services or methods have their Roles property set in the Service Builder.
property Roles: TStringArray read write
SessionID
Contains the ID that uniquely identifies the session, and matches the ClientID received from the user.
property SessionID: TGUID read
Values
This indexer property gives access to the values stored in the session by name.
property Values[Name: string]: Variant read write
constructor Create virtual
Creates a new instance.
constructor Create(const aSessionID: TGUID)
Parameters:
- aSessionID: Session ID
GetKeys protected virtual
function GetKeys: TROSessionKeys
LoadFromStream virtual
Loads data from stream.
procedure LoadFromStream(Source: TStream; OnlyValues: Boolean)
Parameters:
- Source: Stream
- OnlyValues: Loads name=value pair only
Remove
Removes specified value from session
procedure Remove(const Name: string)
Parameters:
- Name: name
SaveStruct
Allows to save struct to session
procedure SaveStruct(aStruct: TROComplexType)
Parameters:
- aStruct: struct
SaveToStream virtual
Saves data to stream.
procedure SaveToStream(Dest: TStream; OnlyValues: Boolean)
Parameters:
- Dest: Stream
- OnlyValues: Saves name=value pair only