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


Properties


IsActive

 

property IsActive: Boolean read;

 

Boolean IsActive { get; }

 

ReadOnly Property IsActive() As Boolean

Required Methods


Activate

 

method Activate(clientId: Guid; enforceSessionCheck: Boolean; roles: array of String)

 

void Activate(Guid clientId, Boolean enforceSessionCheck, String[] roles)

 

Sub Activate(clientId As Guid, enforceSessionCheck As Boolean, roles As String())

Parameters:

  • clientId:
  • enforceSessionCheck:
  • roles:

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: