TBaseLoginService

Overview

This article shows how to implement the base service for user authentication with the IBaseLoginService service interface.

This is a base service for TSimpleLoginService and TMultiDbLoginService.

Location


 

constructor Create  override

Standard component constructor

constructor Create(aOwner: TComponent)

Parameters:

  • aOwner: Owner.

AcquireConnection    (declared in TBaseDataAbstractService)

Toggles whether the service can automatically acquire a connection when needed (true, default) or not (false).

property AcquireConnection: Boolean read write

AllowCustomSqlMacros  protected    (declared in TBaseDataAbstractService)

Allows clients to use custom variables of Macro Processor.

property AllowCustomSqlMacros: Boolean read write

AllowRemoteEventsRegistration  protected    (declared in TRORemoteDataModule)

Obsolete, replaced by the LegacyEvents property.

function AllowRemoteEventsRegistration: Boolean

Assign  override    (declared in TBaseDataAbstractService)

Copies data from a given source.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

CheckForConnectionManager    (declared in TBaseDataAbstractService)

Validates ServiceSchema.ConnectionManager property.

procedure CheckForConnectionManager

ClientID    (declared in TRORemoteDataModule)

The unique identifier for the client connected to the service. It is equal to the session ID if the session already exists. When the service method is called, this property is already initialized with a proper value. Do not change it unless you know what you are doing!

property ClientID: TGUID read write

Connection    (declared in TBaseDataAbstractService)

Returns a live connection to the back-end database based on the configured ConnectionName value. If a connection was previously requested, the same instance will be returned, if a fresh connection to the database couldn't be obtained from the connection manager. Once a connection is acquired, it will be held on until the service gets deactivated, or ReleaseConnection is called.

property Connection: IDAConnection read write

ConnectionName    (declared in TBaseDataAbstractService)

Defines the name of the connection that this service will use to connect to the back-end database. If set, all data access done by the service will use the specified connection; if not set, the default connection as defined in connection manager will be used. A typical use case for this property would be to set the connection name in the OnActivate or BeforeAcquireConnection event to match a specific connection, which, for example, could have been stored in the Sessions. The default code provided by the MultiDb Server template uses this approach. When setting ConnectionName and a connection is already acquired, make sure to call the ReleaseConnection method, so that a new connection will be obtained when needed.

property ConnectionName: string read write

CreateSession    (declared in TRORemoteDataModule)

Creates a new session object and makes it available via the Session property. As a rule, there is no need to call this method because the session is created automatically when required.

procedure CreateSession

CustomRequireSession  protected virtual    (declared in TRORemoteDataModule)

Internal use only, don't override.

function CustomRequireSession(const aMessage: IROMessage): Boolean

Parameters:

  • aMessage: Message

DestroySession    (declared in TRORemoteDataModule)

Destroys the current session object. This method is primarily used to destroy the session in case of unsuccessful client authentication.

procedure DestroySession

DoOnDeactivate  protected override    (declared in TBaseDataAbstractService)

Destroys default connection.

procedure DoOnDeactivate(aClientID: TGUID)

Parameters:

  • aClientID: Client ID

EventRepository    (declared in TRORemoteDataModule)

Points to the event repository (TROEventRepository instance) for the service. The value must be set to use the events feature.

property EventRepository: TROEventRepository read write

GetDispatchInfo  protected virtual    (declared in TRORemoteDataModule)

Allows to grab the input parameters to get all information about the upcoming call including the remote method parameters and the calling client transport object.

procedure GetDispatchInfo(const aTransport: IROTransport; const aMessage: IROMessage)

Parameters:

  • aTransport: Points to the transport object containing connection-specific information
  • aMessage: Message that needs to be processed

GetEventsData  protected    (declared in TRORemoteDataModule)

Collects events data to the memory stream. For internal use only, don't call or override.

function GetEventsData(const ClientID: string; out EventsData: Binary): Integer

Parameters:

  • ClientID: Client ID
  • EventsData: Binary stream that holds the event data

IsRetained  protected    (declared in TRORemoteDataModule)

Returns true if anObject is retained by Self.

function IsRetained(const anObject: TObject): Boolean

Parameters:

  • anObject: Object to check

IsSessionPresent    (declared in TRORemoteDataModule)

Checks if session is present

function IsSessionPresent: Boolean

LegacyEvents    (declared in TRORemoteDataModule)

Enables or disables the legacy events mode for the service. The default value is true. The legacy mode is less secure and it is recommended to set this property to false for new projects. Note that refusing to use the legacy mode will break compatibility with legacy Delphi clients.

property LegacyEvents: Boolean read write

LoginEx  protected virtual

Provides the actual login procedure.

function LoginEx(const aLoginString: ROUTF8String): Boolean

Parameters:

  • aLoginString: String that contains the connection name, user name and password

Logout  protected

This method performs the log out.

procedure Logout

NewSession    (declared in TRORemoteDataModule)

Indicates that the client's session was just created, i.e. this indicates the first connection of a so far unknown client.

property NewSession: Boolean read

OnAcquireConnectionFailure    (declared in TBaseDataAbstractService)

Fired when acquiring a connection failed.

property OnAcquireConnectionFailure: TDAAcquireConnectionFailureEvent read write
delegate: procedure OnAcquireConnectionFailure(aSender: TObject; const aConnectionName: string; aError: Exception)

OnActivate    (declared in TRORemoteDataModule)

Called just after the service is created and before any service method is called. Handle this event for everything you need to do when the service instance is created.

property OnActivate: TActivateEvent read write
delegate: procedure OnActivate(const aClientID: TGUID; aSession: TROSession; const aMessage: IROMessage)

OnAfterAcquireConnection    (declared in TBaseDataAbstractService)

Fires right after a new connection is acquired through the Connection property. Use this event to make perform initializations on the new connection, such as opening a transaction, or setting connection options.

property OnAfterAcquireConnection: TDAConnectionAcquiredEvent read write
delegate: procedure OnAfterAcquireConnection(aSender: TObject; const aConnectionName: string; const aAcquiredConnection: IDAConnection)

OnAfterReleaseConnection    (declared in TBaseDataAbstractService)

Fires right after a connection is released.

property OnAfterReleaseConnection: TDAConnectionReleasedEvent read write
delegate: procedure OnAfterReleaseConnection(aSender: TObject; const aConnectionName: string)

OnBeforeAcquireConnection    (declared in TBaseDataAbstractService)

Fires just before a new connection is acquired through the Connection property. Use this event to make last-minute configurations before the connection will be acquired, such as changing the ConnectionName.

property OnBeforeAcquireConnection: TDAAcquireConnectionEvent read write
delegate: procedure OnBeforeAcquireConnection(aSender: TObject; var aConnectionName: string)

OnBeforeRegisterEventClient    (declared in TRORemoteDataModule)

Called when the new client is being registered to receive events. Deprecated now, since remote event (un-)registration is forbidden (LegacyEvents = false).

property OnBeforeRegisterEventClient: TRegisterEventClientEvent read write
delegate: procedure OnBeforeRegisterEventClient(const aClientID: TGUID; const EventTypes: string)

OnBeforeReleaseConnection    (declared in TBaseDataAbstractService)

Fires just before the connection is released. Use this event to perform any finalization tasks on the new connection, such as closing a transaction, or setting connection options.

property OnBeforeReleaseConnection: TDAConnectionAcquiredEvent read write
delegate: procedure OnBeforeReleaseConnection(aSender: TObject; const aConnectionName: string; const aAcquiredConnection: IDAConnection)

OnBeforeUnregisterEventClient    (declared in TRORemoteDataModule)

Called when the client is being unsubscribed from events. Deprecated now, since remote event (un-)registration is forbidden (LegacyEvents = false).

property OnBeforeUnregisterEventClient: TRegisterEventClientEvent read write
delegate: procedure OnBeforeUnregisterEventClient(const aClientID: TGUID; const EventTypes: string)

OnDeactivate    (declared in TRORemoteDataModule)

Called after the service method completes and before the service instance is freed. Handle this event to perform actions on service destruction, such as disposing of resources.

property OnDeactivate: TDeactivateEvent read write
delegate: procedure OnDeactivate(const aClientID: TGUID; aSession: TROSession)

OnGetDispatchInfo    (declared in TRORemoteDataModule)

This event is fired before the invoker executes the service method. Handle this event to preview remote methods about to be executed; the input parameters allow to get all information about the upcoming call including the remote method parameters and the calling client transport object.

property OnGetDispatchInfo: TGetDispatchInfoEvent read write
delegate: procedure OnGetDispatchInfo(const aTransport: IROTransport; const aMessage: IROMessage)

OnLogout

Implement this event handler to provide the actual logout procedure.

property OnLogout: TNotifyEvent read write

OnUnknownSqlMacroIdentifier    (declared in TBaseDataAbstractService)

Fires when unknown macro variable is found. it can be usable when user-defined variables are used inside sql or Dynamic Where expression.

property OnUnknownSqlMacroIdentifier: TOnUnknownIdentifier read write
delegate: function OnUnknownSqlMacroIdentifier(Sender: TObject; const Name: string; const OrgName: string; var Value: string): Boolean

OnValidateRoles    (declared in TRORemoteDataModule)

Validates roles.

property OnValidateRoles: TValidateRolesEvent read write
delegate: procedure OnValidateRoles(aRoles: array of string; var aAllow: Boolean)

RefCount    (declared in TRORemoteDataModule)

Reference counter - this class is the interfaced object.

property RefCount: Integer read

RegisterEventClient (TROSession, string)  protected overload    (declared in TRORemoteDataModule)

Registers the client to receive server callback events of the specified type.

procedure RegisterEventClient(const aSession: TROSession; const EventTypes: string)

Parameters:

  • aSession: Client session
  • EventTypes: Identifier (GUID) of the event sink containing the events to subscribe the client to.

RegisterEventClient (string, string)  protected overload    (declared in TRORemoteDataModule)

Registers the client to receive server callback events of the specified type.

procedure RegisterEventClient(const ClientID: string; const EventTypes: string)

Parameters:

  • ClientID: Client identifier to subscribe
  • EventTypes: Identifier (GUID) of the event sink containing the events to subscribe the client to.

RegisterEventClient (TGUID, string)  protected overload    (declared in TRORemoteDataModule)

Registers the client to receive server callback events of the specified type.

procedure RegisterEventClient(const ClientID: TGUID; const EventTypes: string)

Parameters:

  • ClientID: Client identifier to subscribe
  • EventTypes: Identifier (GUID) of the event sink containing the events to subscribe the client to.

ReleaseConnection    (declared in TBaseDataAbstractService)

Releases any connection currently acquired in the Connection property.

procedure ReleaseConnection

ReleaseObject  protected    (declared in TRORemoteDataModule)

Takes away the hold of anObject set by RetainObject.

procedure ReleaseObject(const anObject: TObject)

Parameters:

  • anObject: Object to release

RequiresSession    (declared in TRORemoteDataModule)

This property should be set to true (perhaps with the designer) to make the service protected and to disallow unauthenticated clients to call its methods. Read more.

property RequiresSession: Boolean read write

RetainObject  protected    (declared in TRORemoteDataModule)

Sets the hold of anObject.

procedure RetainObject(const anObject: TObject)

Parameters:

  • anObject: Object to hold

ServiceSchema    (declared in TBaseDataAbstractService)

This property points to the TDASchema component defining the schema that will be published by this service. This can be a schema component located on the service data module or (more typically) on a separate global data module in the server application. Data Abstract uses a 1:1 mapping of services and schemas, where every service publishes one schema. Depending on your application design and the scope of your server, you might only use one schema for the entire data access, or logically partition your data tables across different schemas (and services). Locating the schema on a global data module rather than the service module itself might provide a slight performance benefit, as the schema structure only has to be loaded into memory once (on application startup), not every time a new service instance is created. Also note that the TDAConnectionManager (referenced from the schema) must be located off the service module and in a global location for connection pooling to work properly across service instances.

property ServiceSchema: TDASchema read write

ServiceValidateRoles  protected    (declared in TRORemoteDataModule)

Validates roles.

procedure ServiceValidateRoles(aRequiredRoles: array of string)

Parameters:

  • aRequiredRoles: Roles

Session    (declared in TRORemoteDataModule)

Provides access to the session object of the current connection. If the session does not exist, it is created at the moment of property access.

property Session: TROSession read

SessionManager    (declared in TRORemoteDataModule)

Points to the session manager to use. It is necessary to assign the session manager if the protected service is being developed and/or it is necessary to use the events feature.

property SessionManager: TROCustomSessionManager read write

Synchronize  protected    (declared in TRORemoteDataModule)

procedure Synchronize(aMethod: TThreadMethod)

Parameters:

  • aMethod:

Transport    (declared in TRORemoteDataModule)

Provides access to the transport object that processes the current network (or other) connection to the server. Various information, such as client IP address, can be available via the transport objects.

property Transport: IROTransport read

UnregisterEventClient (TROSession, string)  protected overload    (declared in TRORemoteDataModule)

procedure UnregisterEventClient(const aSession: TROSession; const EventTypes: string)

Parameters:

  • aSession:
  • EventTypes:

UnregisterEventClient (string, string)  protected overload    (declared in TRORemoteDataModule)

The action is opposite to RegisterEventClient, it cancels the subscription. Unregistration is not absolutely necessary as the client session dies after some time of inactivity but allows to conserve some system resources.

procedure UnregisterEventClient(const ClientID: string; const EventTypes: string)

Parameters:

  • ClientID: Client identifier to unsubscribe
  • EventTypes: Identifier (GUID) of the event sink containing the events to unsubscribe the client from.

UnregisterEventClient (TGUID, string)  protected overload    (declared in TRORemoteDataModule)

procedure UnregisterEventClient(const ClientID: TGUID; const EventTypes: string)

Parameters:

  • ClientID:
  • EventTypes:

 

AcquireConnection    (declared in TBaseDataAbstractService)

Toggles whether the service can automatically acquire a connection when needed (true, default) or not (false).

property AcquireConnection: Boolean read write

AllowCustomSqlMacros  protected    (declared in TBaseDataAbstractService)

Allows clients to use custom variables of Macro Processor.

property AllowCustomSqlMacros: Boolean read write

ClientID    (declared in TRORemoteDataModule)

The unique identifier for the client connected to the service. It is equal to the session ID if the session already exists. When the service method is called, this property is already initialized with a proper value. Do not change it unless you know what you are doing!

property ClientID: TGUID read write

Connection    (declared in TBaseDataAbstractService)

Returns a live connection to the back-end database based on the configured ConnectionName value. If a connection was previously requested, the same instance will be returned, if a fresh connection to the database couldn't be obtained from the connection manager. Once a connection is acquired, it will be held on until the service gets deactivated, or ReleaseConnection is called.

property Connection: IDAConnection read write

ConnectionName    (declared in TBaseDataAbstractService)

Defines the name of the connection that this service will use to connect to the back-end database. If set, all data access done by the service will use the specified connection; if not set, the default connection as defined in connection manager will be used. A typical use case for this property would be to set the connection name in the OnActivate or BeforeAcquireConnection event to match a specific connection, which, for example, could have been stored in the Sessions. The default code provided by the MultiDb Server template uses this approach. When setting ConnectionName and a connection is already acquired, make sure to call the ReleaseConnection method, so that a new connection will be obtained when needed.

property ConnectionName: string read write

EventRepository    (declared in TRORemoteDataModule)

Points to the event repository (TROEventRepository instance) for the service. The value must be set to use the events feature.

property EventRepository: TROEventRepository read write

LegacyEvents    (declared in TRORemoteDataModule)

Enables or disables the legacy events mode for the service. The default value is true. The legacy mode is less secure and it is recommended to set this property to false for new projects. Note that refusing to use the legacy mode will break compatibility with legacy Delphi clients.

property LegacyEvents: Boolean read write

NewSession    (declared in TRORemoteDataModule)

Indicates that the client's session was just created, i.e. this indicates the first connection of a so far unknown client.

property NewSession: Boolean read

RefCount    (declared in TRORemoteDataModule)

Reference counter - this class is the interfaced object.

property RefCount: Integer read

RequiresSession    (declared in TRORemoteDataModule)

This property should be set to true (perhaps with the designer) to make the service protected and to disallow unauthenticated clients to call its methods. Read more.

property RequiresSession: Boolean read write

ServiceSchema    (declared in TBaseDataAbstractService)

This property points to the TDASchema component defining the schema that will be published by this service. This can be a schema component located on the service data module or (more typically) on a separate global data module in the server application. Data Abstract uses a 1:1 mapping of services and schemas, where every service publishes one schema. Depending on your application design and the scope of your server, you might only use one schema for the entire data access, or logically partition your data tables across different schemas (and services). Locating the schema on a global data module rather than the service module itself might provide a slight performance benefit, as the schema structure only has to be loaded into memory once (on application startup), not every time a new service instance is created. Also note that the TDAConnectionManager (referenced from the schema) must be located off the service module and in a global location for connection pooling to work properly across service instances.

property ServiceSchema: TDASchema read write

Session    (declared in TRORemoteDataModule)

Provides access to the session object of the current connection. If the session does not exist, it is created at the moment of property access.

property Session: TROSession read

SessionManager    (declared in TRORemoteDataModule)

Points to the session manager to use. It is necessary to assign the session manager if the protected service is being developed and/or it is necessary to use the events feature.

property SessionManager: TROCustomSessionManager read write

Transport    (declared in TRORemoteDataModule)

Provides access to the transport object that processes the current network (or other) connection to the server. Various information, such as client IP address, can be available via the transport objects.

property Transport: IROTransport read

 

constructor Create  override

Standard component constructor

constructor Create(aOwner: TComponent)

Parameters:

  • aOwner: Owner.

AllowRemoteEventsRegistration  protected    (declared in TRORemoteDataModule)

Obsolete, replaced by the LegacyEvents property.

function AllowRemoteEventsRegistration: Boolean

Assign  override    (declared in TBaseDataAbstractService)

Copies data from a given source.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

CheckForConnectionManager    (declared in TBaseDataAbstractService)

Validates ServiceSchema.ConnectionManager property.

procedure CheckForConnectionManager

CreateSession    (declared in TRORemoteDataModule)

Creates a new session object and makes it available via the Session property. As a rule, there is no need to call this method because the session is created automatically when required.

procedure CreateSession

CustomRequireSession  protected virtual    (declared in TRORemoteDataModule)

Internal use only, don't override.

function CustomRequireSession(const aMessage: IROMessage): Boolean

Parameters:

  • aMessage: Message

DestroySession    (declared in TRORemoteDataModule)

Destroys the current session object. This method is primarily used to destroy the session in case of unsuccessful client authentication.

procedure DestroySession

DoOnDeactivate  protected override    (declared in TBaseDataAbstractService)

Destroys default connection.

procedure DoOnDeactivate(aClientID: TGUID)

Parameters:

  • aClientID: Client ID

GetDispatchInfo  protected virtual    (declared in TRORemoteDataModule)

Allows to grab the input parameters to get all information about the upcoming call including the remote method parameters and the calling client transport object.

procedure GetDispatchInfo(const aTransport: IROTransport; const aMessage: IROMessage)

Parameters:

  • aTransport: Points to the transport object containing connection-specific information
  • aMessage: Message that needs to be processed

GetEventsData  protected    (declared in TRORemoteDataModule)

Collects events data to the memory stream. For internal use only, don't call or override.

function GetEventsData(const ClientID: string; out EventsData: Binary): Integer

Parameters:

  • ClientID: Client ID
  • EventsData: Binary stream that holds the event data

IsRetained  protected    (declared in TRORemoteDataModule)

Returns true if anObject is retained by Self.

function IsRetained(const anObject: TObject): Boolean

Parameters:

  • anObject: Object to check

IsSessionPresent    (declared in TRORemoteDataModule)

Checks if session is present

function IsSessionPresent: Boolean

LoginEx  protected virtual

Provides the actual login procedure.

function LoginEx(const aLoginString: ROUTF8String): Boolean

Parameters:

  • aLoginString: String that contains the connection name, user name and password

Logout  protected

This method performs the log out.

procedure Logout

RegisterEventClient (TROSession, string)  protected overload    (declared in TRORemoteDataModule)

Registers the client to receive server callback events of the specified type.

procedure RegisterEventClient(const aSession: TROSession; const EventTypes: string)

Parameters:

  • aSession: Client session
  • EventTypes: Identifier (GUID) of the event sink containing the events to subscribe the client to.

RegisterEventClient (string, string)  protected overload    (declared in TRORemoteDataModule)

Registers the client to receive server callback events of the specified type.

procedure RegisterEventClient(const ClientID: string; const EventTypes: string)

Parameters:

  • ClientID: Client identifier to subscribe
  • EventTypes: Identifier (GUID) of the event sink containing the events to subscribe the client to.

RegisterEventClient (TGUID, string)  protected overload    (declared in TRORemoteDataModule)

Registers the client to receive server callback events of the specified type.

procedure RegisterEventClient(const ClientID: TGUID; const EventTypes: string)

Parameters:

  • ClientID: Client identifier to subscribe
  • EventTypes: Identifier (GUID) of the event sink containing the events to subscribe the client to.

ReleaseConnection    (declared in TBaseDataAbstractService)

Releases any connection currently acquired in the Connection property.

procedure ReleaseConnection

ReleaseObject  protected    (declared in TRORemoteDataModule)

Takes away the hold of anObject set by RetainObject.

procedure ReleaseObject(const anObject: TObject)

Parameters:

  • anObject: Object to release

RetainObject  protected    (declared in TRORemoteDataModule)

Sets the hold of anObject.

procedure RetainObject(const anObject: TObject)

Parameters:

  • anObject: Object to hold

ServiceValidateRoles  protected    (declared in TRORemoteDataModule)

Validates roles.

procedure ServiceValidateRoles(aRequiredRoles: array of string)

Parameters:

  • aRequiredRoles: Roles

Synchronize  protected    (declared in TRORemoteDataModule)

procedure Synchronize(aMethod: TThreadMethod)

Parameters:

  • aMethod:

UnregisterEventClient (TROSession, string)  protected overload    (declared in TRORemoteDataModule)

procedure UnregisterEventClient(const aSession: TROSession; const EventTypes: string)

Parameters:

  • aSession:
  • EventTypes:

UnregisterEventClient (string, string)  protected overload    (declared in TRORemoteDataModule)

The action is opposite to RegisterEventClient, it cancels the subscription. Unregistration is not absolutely necessary as the client session dies after some time of inactivity but allows to conserve some system resources.

procedure UnregisterEventClient(const ClientID: string; const EventTypes: string)

Parameters:

  • ClientID: Client identifier to unsubscribe
  • EventTypes: Identifier (GUID) of the event sink containing the events to unsubscribe the client from.

UnregisterEventClient (TGUID, string)  protected overload    (declared in TRORemoteDataModule)

procedure UnregisterEventClient(const ClientID: TGUID; const EventTypes: string)

Parameters:

  • ClientID:
  • EventTypes:

 

OnAcquireConnectionFailure    (declared in TBaseDataAbstractService)

Fired when acquiring a connection failed.

property OnAcquireConnectionFailure: TDAAcquireConnectionFailureEvent read write
delegate: procedure OnAcquireConnectionFailure(aSender: TObject; const aConnectionName: string; aError: Exception)

OnActivate    (declared in TRORemoteDataModule)

Called just after the service is created and before any service method is called. Handle this event for everything you need to do when the service instance is created.

property OnActivate: TActivateEvent read write
delegate: procedure OnActivate(const aClientID: TGUID; aSession: TROSession; const aMessage: IROMessage)

OnAfterAcquireConnection    (declared in TBaseDataAbstractService)

Fires right after a new connection is acquired through the Connection property. Use this event to make perform initializations on the new connection, such as opening a transaction, or setting connection options.

property OnAfterAcquireConnection: TDAConnectionAcquiredEvent read write
delegate: procedure OnAfterAcquireConnection(aSender: TObject; const aConnectionName: string; const aAcquiredConnection: IDAConnection)

OnAfterReleaseConnection    (declared in TBaseDataAbstractService)

Fires right after a connection is released.

property OnAfterReleaseConnection: TDAConnectionReleasedEvent read write
delegate: procedure OnAfterReleaseConnection(aSender: TObject; const aConnectionName: string)

OnBeforeAcquireConnection    (declared in TBaseDataAbstractService)

Fires just before a new connection is acquired through the Connection property. Use this event to make last-minute configurations before the connection will be acquired, such as changing the ConnectionName.

property OnBeforeAcquireConnection: TDAAcquireConnectionEvent read write
delegate: procedure OnBeforeAcquireConnection(aSender: TObject; var aConnectionName: string)

OnBeforeRegisterEventClient    (declared in TRORemoteDataModule)

Called when the new client is being registered to receive events. Deprecated now, since remote event (un-)registration is forbidden (LegacyEvents = false).

property OnBeforeRegisterEventClient: TRegisterEventClientEvent read write
delegate: procedure OnBeforeRegisterEventClient(const aClientID: TGUID; const EventTypes: string)

OnBeforeReleaseConnection    (declared in TBaseDataAbstractService)

Fires just before the connection is released. Use this event to perform any finalization tasks on the new connection, such as closing a transaction, or setting connection options.

property OnBeforeReleaseConnection: TDAConnectionAcquiredEvent read write
delegate: procedure OnBeforeReleaseConnection(aSender: TObject; const aConnectionName: string; const aAcquiredConnection: IDAConnection)

OnBeforeUnregisterEventClient    (declared in TRORemoteDataModule)

Called when the client is being unsubscribed from events. Deprecated now, since remote event (un-)registration is forbidden (LegacyEvents = false).

property OnBeforeUnregisterEventClient: TRegisterEventClientEvent read write
delegate: procedure OnBeforeUnregisterEventClient(const aClientID: TGUID; const EventTypes: string)

OnDeactivate    (declared in TRORemoteDataModule)

Called after the service method completes and before the service instance is freed. Handle this event to perform actions on service destruction, such as disposing of resources.

property OnDeactivate: TDeactivateEvent read write
delegate: procedure OnDeactivate(const aClientID: TGUID; aSession: TROSession)

OnGetDispatchInfo    (declared in TRORemoteDataModule)

This event is fired before the invoker executes the service method. Handle this event to preview remote methods about to be executed; the input parameters allow to get all information about the upcoming call including the remote method parameters and the calling client transport object.

property OnGetDispatchInfo: TGetDispatchInfoEvent read write
delegate: procedure OnGetDispatchInfo(const aTransport: IROTransport; const aMessage: IROMessage)

OnLogout

Implement this event handler to provide the actual logout procedure.

property OnLogout: TNotifyEvent read write

OnUnknownSqlMacroIdentifier    (declared in TBaseDataAbstractService)

Fires when unknown macro variable is found. it can be usable when user-defined variables are used inside sql or Dynamic Where expression.

property OnUnknownSqlMacroIdentifier: TOnUnknownIdentifier read write
delegate: function OnUnknownSqlMacroIdentifier(Sender: TObject; const Name: string; const OrgName: string; var Value: string): Boolean

OnValidateRoles    (declared in TRORemoteDataModule)

Validates roles.

property OnValidateRoles: TValidateRolesEvent read write
delegate: procedure OnValidateRoles(aRoles: array of string; var aAllow: Boolean)