SessionManager

Overview

This is the abstract base class for all session manager implementations. You will descend from this class when implementing a custom session manager, or use one of the existing descendants.

Location

Implements

 

constructor  protected

 

constructor(register: Boolean; initializeSessionExpirationTimer: Boolean)

 

SessionManager(Boolean register, Boolean initializeSessionExpirationTimer)

 

Sub New (register As Boolean, initializeSessionExpirationTimer As Boolean)

Parameters:

  • register:
  • initializeSessionExpirationTimer:

add_OnSessionCreated

 

method add_OnSessionCreated(value: SessionEventHandler)

 

void add_OnSessionCreated(SessionEventHandler value)

 

Sub add_OnSessionCreated(value As SessionEventHandler)

Parameters:

  • value:

add_OnSessionDestroyed

 

method add_OnSessionDestroyed(value: SessionIDEventHandler)

 

void add_OnSessionDestroyed(SessionIDEventHandler value)

 

Sub add_OnSessionDestroyed(value As SessionIDEventHandler)

Parameters:

  • value:

add_OnSessionExpired

 

method add_OnSessionExpired(value: SessionEventHandler)

 

void add_OnSessionExpired(SessionEventHandler value)

 

Sub add_OnSessionExpired(value As SessionEventHandler)

Parameters:

  • value:

CreateNewSession  protected

 

method CreateNewSession(sessionId: Guid): ISession

 

ISession CreateNewSession(Guid sessionId)

 

Function CreateNewSession(sessionId As Guid) As ISession

Parameters:

  • sessionId:

DestroySession (Guid)

 

method DestroySession(sessionId: Guid)

 

void DestroySession(Guid sessionId)

 

Sub DestroySession(sessionId As Guid)

Parameters:

  • sessionId:

DestroySession (ISession)

 

method DestroySession(session: ISession)

 

void DestroySession(ISession session)

 

Sub DestroySession(session As ISession)

Parameters:

  • session:

Dispose  protected

 

method Dispose(disposing: Boolean)

 

void Dispose(Boolean disposing)

 

Sub Dispose(disposing As Boolean)

Parameters:

  • disposing:

ExpireSessions

This method will expire all sessions in the Session Manager that have exceeded the timeout. Note: SessionManager will regularly check for expired sessions automatically, but you can use this method to trigger an expiration cycle manually.

 

method ExpireSessions

 

void ExpireSessions()

 

Sub ExpireSessions

GetAllSessions

 

method GetAllSessions: IList<Guid>

 

IList<Guid> GetAllSessions()

 

Function GetAllSessions As IList<Guid>

GetExistingSession

 

method GetExistingSession(sessionId: Guid; updateTime: Boolean): ISession

 

ISession GetExistingSession(Guid sessionId, Boolean updateTime)

 

Function GetExistingSession(sessionId As Guid, updateTime As Boolean) As ISession

Parameters:

  • sessionId:
  • updateTime:

GetSession

 

method GetSession(sessionId: Guid): ISession

 

ISession GetSession(Guid sessionId)

 

Function GetSession(sessionId As Guid) As ISession

Parameters:

  • sessionId:

GlobalSessionManager

 

class property GlobalSessionManager: ISessionManager read;

 

class ISessionManager GlobalSessionManager { get; }

 

Shared Property ReadOnly GlobalSessionManager As ISessionManager

IsOutOfProcess

 

property IsOutOfProcess: Boolean read;

 

Boolean IsOutOfProcess { get; }

 

Property ReadOnly IsOutOfProcess As Boolean

LocateExistingSession  protected

 

method LocateExistingSession(sessionId: Guid; updateTime: Boolean): ISession

 

ISession LocateExistingSession(Guid sessionId, Boolean updateTime)

 

Function LocateExistingSession(sessionId As Guid, updateTime As Boolean) As ISession

Parameters:

  • sessionId:
  • updateTime:

OnSessionCreated

Gets triggered after a new Session has been created. You can use it to perform initialization functions or fill the session with default values.

 

event OnSessionCreated: SessionEventHandler;
delegate: method OnSessionCreated(sender: Object; e: SessionEventArgs)

 

delegate SessionEventHandler OnSessionCreated()
delegate: void OnSessionCreated(Object sender, SessionEventArgs e)

 

Event OnSessionCreated As SessionEventHandler
delegate: Sub OnSessionCreated(sender As Object, e As SessionEventArgs)

OnSessionDestroyed

Gets triggered after a new Session has been manually destroyed. You can use it to perform cleanup for a specific session id.

Note: The session has already been Disposed when the OnSessionDestroyed event fires. This event will not fire for sessions that expire.

 

event OnSessionDestroyed: SessionIDEventHandler;
delegate: method OnSessionDestroyed(sender: Object; e: SessionIDEventArgs)

 

delegate SessionIDEventHandler OnSessionDestroyed()
delegate: void OnSessionDestroyed(Object sender, SessionIDEventArgs e)

 

Event OnSessionDestroyed As SessionIDEventHandler
delegate: Sub OnSessionDestroyed(sender As Object, e As SessionIDEventArgs)

OnSessionExpired

Gets triggered after a new Session has been expired. You can use it to perform cleanup and/or inspect the values of the expired session.

Note: The session has already been Disposed when the OnSessionExpired event fires. This event will not fire for sessions that are manually destroyed.

 

event OnSessionExpired: SessionEventHandler;
delegate: method OnSessionExpired(sender: Object; e: SessionEventArgs)

 

delegate SessionEventHandler OnSessionExpired()
delegate: void OnSessionExpired(Object sender, SessionEventArgs e)

 

Event OnSessionExpired As SessionEventHandler
delegate: Sub OnSessionExpired(sender As Object, e As SessionEventArgs)

RegisterSessionManager

 

class method RegisterSessionManager(manager: ISessionManager)

 

static void RegisterSessionManager(ISessionManager manager)

 

Shared Sub RegisterSessionManager(manager As ISessionManager)

Parameters:

  • manager:

ReleaseSession

 

method ReleaseSession(session: ISession)

 

void ReleaseSession(ISession session)

 

Sub ReleaseSession(session As ISession)

Parameters:

  • session:

remove_OnSessionCreated

 

method remove_OnSessionCreated(value: SessionEventHandler)

 

void remove_OnSessionCreated(SessionEventHandler value)

 

Sub remove_OnSessionCreated(value As SessionEventHandler)

Parameters:

  • value:

remove_OnSessionDestroyed

 

method remove_OnSessionDestroyed(value: SessionIDEventHandler)

 

void remove_OnSessionDestroyed(SessionIDEventHandler value)

 

Sub remove_OnSessionDestroyed(value As SessionIDEventHandler)

Parameters:

  • value:

remove_OnSessionExpired

 

method remove_OnSessionExpired(value: SessionEventHandler)

 

void remove_OnSessionExpired(SessionEventHandler value)

 

Sub remove_OnSessionExpired(value As SessionEventHandler)

Parameters:

  • value:

SessionCount  protected

 

property SessionCount: Int32 read;

 

Int32 SessionCount { get; }

 

Property ReadOnly SessionCount As Int32

Timeout

 

property Timeout: Int32 read write;

 

Int32 Timeout { get; set; }

 

Property Timeout As Int32

TriggerOnSessionCreated  protected

 

method TriggerOnSessionCreated(e: SessionEventArgs)

 

void TriggerOnSessionCreated(SessionEventArgs e)

 

Sub TriggerOnSessionCreated(e As SessionEventArgs)

Parameters:

  • e:

TriggerOnSessionDestroyed  protected

 

method TriggerOnSessionDestroyed(e: SessionIDEventArgs)

 

void TriggerOnSessionDestroyed(SessionIDEventArgs e)

 

Sub TriggerOnSessionDestroyed(e As SessionIDEventArgs)

Parameters:

  • e:

TriggerOnSessionExpired  protected

 

method TriggerOnSessionExpired(e: SessionEventArgs)

 

void TriggerOnSessionExpired(SessionEventArgs e)

 

Sub TriggerOnSessionExpired(e As SessionEventArgs)

Parameters:

  • e:

UnregisterSessionManager

 

class method UnregisterSessionManager(manager: ISessionManager)

 

static void UnregisterSessionManager(ISessionManager manager)

 

Shared Sub UnregisterSessionManager(manager As ISessionManager)

Parameters:

  • manager:

 

IsOutOfProcess

 

property IsOutOfProcess: Boolean read;

 

Boolean IsOutOfProcess { get; }

 

Property ReadOnly IsOutOfProcess As Boolean

SessionCount  protected

 

property SessionCount: Int32 read;

 

Int32 SessionCount { get; }

 

Property ReadOnly SessionCount As Int32

Timeout

 

property Timeout: Int32 read write;

 

Int32 Timeout { get; set; }

 

Property Timeout As Int32

GlobalSessionManager

 

class property GlobalSessionManager: ISessionManager read;

 

class ISessionManager GlobalSessionManager { get; }

 

Shared Property ReadOnly GlobalSessionManager As ISessionManager

 

RegisterSessionManager

 

class method RegisterSessionManager(manager: ISessionManager)

 

static void RegisterSessionManager(ISessionManager manager)

 

Shared Sub RegisterSessionManager(manager As ISessionManager)

Parameters:

  • manager:

UnregisterSessionManager

 

class method UnregisterSessionManager(manager: ISessionManager)

 

static void UnregisterSessionManager(ISessionManager manager)

 

Shared Sub UnregisterSessionManager(manager As ISessionManager)

Parameters:

  • manager:

 

constructor  protected

 

constructor(register: Boolean; initializeSessionExpirationTimer: Boolean)

 

SessionManager(Boolean register, Boolean initializeSessionExpirationTimer)

 

Sub New (register As Boolean, initializeSessionExpirationTimer As Boolean)

Parameters:

  • register:
  • initializeSessionExpirationTimer:

add_OnSessionCreated

 

method add_OnSessionCreated(value: SessionEventHandler)

 

void add_OnSessionCreated(SessionEventHandler value)

 

Sub add_OnSessionCreated(value As SessionEventHandler)

Parameters:

  • value:

add_OnSessionDestroyed

 

method add_OnSessionDestroyed(value: SessionIDEventHandler)

 

void add_OnSessionDestroyed(SessionIDEventHandler value)

 

Sub add_OnSessionDestroyed(value As SessionIDEventHandler)

Parameters:

  • value:

add_OnSessionExpired

 

method add_OnSessionExpired(value: SessionEventHandler)

 

void add_OnSessionExpired(SessionEventHandler value)

 

Sub add_OnSessionExpired(value As SessionEventHandler)

Parameters:

  • value:

CreateNewSession  protected

 

method CreateNewSession(sessionId: Guid): ISession

 

ISession CreateNewSession(Guid sessionId)

 

Function CreateNewSession(sessionId As Guid) As ISession

Parameters:

  • sessionId:

DestroySession (Guid)

 

method DestroySession(sessionId: Guid)

 

void DestroySession(Guid sessionId)

 

Sub DestroySession(sessionId As Guid)

Parameters:

  • sessionId:

DestroySession (ISession)

 

method DestroySession(session: ISession)

 

void DestroySession(ISession session)

 

Sub DestroySession(session As ISession)

Parameters:

  • session:

Dispose  protected

 

method Dispose(disposing: Boolean)

 

void Dispose(Boolean disposing)

 

Sub Dispose(disposing As Boolean)

Parameters:

  • disposing:

ExpireSessions

This method will expire all sessions in the Session Manager that have exceeded the timeout. Note: SessionManager will regularly check for expired sessions automatically, but you can use this method to trigger an expiration cycle manually.

 

method ExpireSessions

 

void ExpireSessions()

 

Sub ExpireSessions

GetAllSessions

 

method GetAllSessions: IList<Guid>

 

IList<Guid> GetAllSessions()

 

Function GetAllSessions As IList<Guid>

GetExistingSession

 

method GetExistingSession(sessionId: Guid; updateTime: Boolean): ISession

 

ISession GetExistingSession(Guid sessionId, Boolean updateTime)

 

Function GetExistingSession(sessionId As Guid, updateTime As Boolean) As ISession

Parameters:

  • sessionId:
  • updateTime:

GetSession

 

method GetSession(sessionId: Guid): ISession

 

ISession GetSession(Guid sessionId)

 

Function GetSession(sessionId As Guid) As ISession

Parameters:

  • sessionId:

LocateExistingSession  protected

 

method LocateExistingSession(sessionId: Guid; updateTime: Boolean): ISession

 

ISession LocateExistingSession(Guid sessionId, Boolean updateTime)

 

Function LocateExistingSession(sessionId As Guid, updateTime As Boolean) As ISession

Parameters:

  • sessionId:
  • updateTime:

ReleaseSession

 

method ReleaseSession(session: ISession)

 

void ReleaseSession(ISession session)

 

Sub ReleaseSession(session As ISession)

Parameters:

  • session:

remove_OnSessionCreated

 

method remove_OnSessionCreated(value: SessionEventHandler)

 

void remove_OnSessionCreated(SessionEventHandler value)

 

Sub remove_OnSessionCreated(value As SessionEventHandler)

Parameters:

  • value:

remove_OnSessionDestroyed

 

method remove_OnSessionDestroyed(value: SessionIDEventHandler)

 

void remove_OnSessionDestroyed(SessionIDEventHandler value)

 

Sub remove_OnSessionDestroyed(value As SessionIDEventHandler)

Parameters:

  • value:

remove_OnSessionExpired

 

method remove_OnSessionExpired(value: SessionEventHandler)

 

void remove_OnSessionExpired(SessionEventHandler value)

 

Sub remove_OnSessionExpired(value As SessionEventHandler)

Parameters:

  • value:

TriggerOnSessionCreated  protected

 

method TriggerOnSessionCreated(e: SessionEventArgs)

 

void TriggerOnSessionCreated(SessionEventArgs e)

 

Sub TriggerOnSessionCreated(e As SessionEventArgs)

Parameters:

  • e:

TriggerOnSessionDestroyed  protected

 

method TriggerOnSessionDestroyed(e: SessionIDEventArgs)

 

void TriggerOnSessionDestroyed(SessionIDEventArgs e)

 

Sub TriggerOnSessionDestroyed(e As SessionIDEventArgs)

Parameters:

  • e:

TriggerOnSessionExpired  protected

 

method TriggerOnSessionExpired(e: SessionEventArgs)

 

void TriggerOnSessionExpired(SessionEventArgs e)

 

Sub TriggerOnSessionExpired(e As SessionEventArgs)

Parameters:

  • e:

 

OnSessionCreated

Gets triggered after a new Session has been created. You can use it to perform initialization functions or fill the session with default values.

 

event OnSessionCreated: SessionEventHandler;
delegate: method OnSessionCreated(sender: Object; e: SessionEventArgs)

 

delegate SessionEventHandler OnSessionCreated()
delegate: void OnSessionCreated(Object sender, SessionEventArgs e)

 

Event OnSessionCreated As SessionEventHandler
delegate: Sub OnSessionCreated(sender As Object, e As SessionEventArgs)

OnSessionDestroyed

Gets triggered after a new Session has been manually destroyed. You can use it to perform cleanup for a specific session id.

Note: The session has already been Disposed when the OnSessionDestroyed event fires. This event will not fire for sessions that expire.

 

event OnSessionDestroyed: SessionIDEventHandler;
delegate: method OnSessionDestroyed(sender: Object; e: SessionIDEventArgs)

 

delegate SessionIDEventHandler OnSessionDestroyed()
delegate: void OnSessionDestroyed(Object sender, SessionIDEventArgs e)

 

Event OnSessionDestroyed As SessionIDEventHandler
delegate: Sub OnSessionDestroyed(sender As Object, e As SessionIDEventArgs)

OnSessionExpired

Gets triggered after a new Session has been expired. You can use it to perform cleanup and/or inspect the values of the expired session.

Note: The session has already been Disposed when the OnSessionExpired event fires. This event will not fire for sessions that are manually destroyed.

 

event OnSessionExpired: SessionEventHandler;
delegate: method OnSessionExpired(sender: Object; e: SessionEventArgs)

 

delegate SessionEventHandler OnSessionExpired()
delegate: void OnSessionExpired(Object sender, SessionEventArgs e)

 

Event OnSessionExpired As SessionEventHandler
delegate: Sub OnSessionExpired(sender As Object, e As SessionEventArgs)

Descendants