pascalSCADA OPM: MutexClient: Class TMutexClientThread

Pascal SCADA OPM

Class TMutexClientThread

Unit

MutexClient

Declaration

type TMutexClientThread = class(TCrossThread)

Description

TMutexClientThread

Hierarchy

Overview

Methods

Protected procedure SetIntoServerMutexBehavior; virtual;
Protected procedure SetOutServerMutexBehavior; virtual;
Protected procedure Execute; override;
Protected procedure ServerHasBeenFinished; virtual;
Protected function PingServer:Boolean;
Public constructor Create(CreateSuspended: Boolean; aSocket: Tsocket);
Public destructor Destroy; override;
Public function TryEnter:Boolean;
Public function Leave: Boolean;
Public procedure DisconnectFromServer; virtual;
Public procedure WaitEnd;

Properties

Published property onServerHasBeenFinished: TNotifyEvent read fServerHasBeenFinished write fServerHasBeenFinished;
Published property onConnectionBroken: TNotifyEvent read fConnectionBroken write fConnectionBroken;

Description

Methods

Protected procedure SetIntoServerMutexBehavior; virtual;

called when client got the mutex

Protected procedure SetOutServerMutexBehavior; virtual;

called when the client leaves the mutex.

Protected procedure Execute; override;

check for ping commmands when client owns the mutex.

Protected procedure ServerHasBeenFinished; virtual;

called when server sends a quit command.

Protected function PingServer:Boolean;

ping server

Public constructor Create(CreateSuspended: Boolean; aSocket: Tsocket);
 
Public destructor Destroy; override;
 
Public function TryEnter:Boolean;

try enter on server mutex.

Public function Leave: Boolean;

leave the server mutex.

Public procedure DisconnectFromServer; virtual;

send a quit command to server.

Public procedure WaitEnd;

wait the client thread ends.

Properties

Published property onServerHasBeenFinished: TNotifyEvent read fServerHasBeenFinished write fServerHasBeenFinished;
 
Published property onConnectionBroken: TNotifyEvent read fConnectionBroken write fConnectionBroken;
 

Generated by PasDoc 0.14.0.