IActivatableService

Overview

This interface can be implemented by service implementations that want to be notified for activation and deactivation (i.e. before and after they will be asked to serve a remote request).

Depending on your instantiation method and class factory, you can use these events to read/persist session data, perform cleanup or other tasks.

Notes

You're using Service as the base class for your service implementation (which is the default), this interface is already implemented for you and hooked up to the standard session management mechanism. Events are provided for you to hook into the activation and deactivation process for custom handling.

Location

Implemented in

Properties


IsActive

 

property IsActive: Boolean read;

 

Boolean IsActive { get; }

 

Property ReadOnly IsActive As Boolean

Required Methods


Activate

 

method Activate(clientId: Guid; enforceSessionCheck: Boolean)

 

void Activate(Guid clientId, Boolean enforceSessionCheck)

 

Sub Activate(clientId As Guid, enforceSessionCheck As Boolean)

Parameters:

  • clientId:
  • enforceSessionCheck:

Deactivate

Gets called just after your service implementation has served a call and is about to be deactivated. The passed ClientID is the session GUID received from the client and you can use it to persist session data for subsequent calls.

This is the same ID as you received during the call to Activate, so you can use it to match up calls.

 

method Deactivate(clientId: Guid)

 

void Deactivate(Guid clientId)

 

Sub Deactivate(clientId As Guid)

Parameters:

  • clientId: