TROServerCheckMessageThread

Overview

The TROServerCheckMessageThread abstract class serves as ancestor for thread classes designed to perform periodic check actions like checking for e-mail messages. This class is not intended to be used directly and has only one descendant as for now.

Location


 

constructor Create (Boolean, string)    (declared in TROThread)

Initializes the instance with the given arguments.

constructor Create(aCreateSuspended: Boolean; const aName: string)

Parameters:

  • aCreateSuspended: If true, Execute won’t be called until after Resume is called; if false, Execute is called immediately.
  • aName: Become the value of the Name property.

constructor Create (string, TComponent, Integer)  reintroduce

Creates the object instance and sets the specific parameters.

constructor Create(aName: string; aOwner: TComponent; aInterval: Integer)

Parameters:

  • aName: Name of the thread.
  • aOwner: Points to the component (for example the server) that has spawned this thread object.
  • aInterval: Time interval in seconds to perform the periodic action.

constructor Create (Boolean)    (declared in TROInitializedThread)

Creates a new class instance (standard thread class constructor).

constructor Create(CreateSuspended: Boolean)

Parameters:

  • CreateSuspended: When set to true, this parameter allows to create a thread that will not be started right after it is created. This allows to do some thread class configuration before the execution begins.

Active

Allows to start and stop the periodic action execution. When being assigned, the property value is copied to the underlying TThread.Suspended property.

property Active: Boolean read write

CheckForMessages  protected virtual abstract

This method is executed periodically by the thread. The method is abstract and must be overriden in descendants.

procedure CheckForMessages

DoTerminate  protected override    (declared in TROThread)

procedure DoTerminate

Execute  protected override    (declared in TROInitializedThread)

This method will be executed on the background thread, and should contain the user code. In this class, the Execute method must not be overridden in descendant classes, override IntExecute instead.

procedure Execute

Free  reintroduce    (declared in TROThread)

procedure Free

Name  protected    (declared in TROThread)

Sets a readable name for the thread.

property Name: string read

Owner  protected

Points to the component (for example the server) that has spawned this thread object.

property Owner: TComponent read

SetName  protected    (declared in TROThread)

procedure SetName(const aName: string)

Parameters:

  • aName:

TerminateWaitFor  override

Utility method that combines a call to Terminate with a subsequent call to WaitFor.

procedure TerminateWaitFor

WaitFor  reintroduce    (declared in TROThread)

Blocks the current thread until the current event receives a signal.

function WaitFor: Cardinal

 

Active

Allows to start and stop the periodic action execution. When being assigned, the property value is copied to the underlying TThread.Suspended property.

property Active: Boolean read write

Name  protected    (declared in TROThread)

Sets a readable name for the thread.

property Name: string read

Owner  protected

Points to the component (for example the server) that has spawned this thread object.

property Owner: TComponent read

 

constructor Create (Boolean, string)    (declared in TROThread)

Initializes the instance with the given arguments.

constructor Create(aCreateSuspended: Boolean; const aName: string)

Parameters:

  • aCreateSuspended: If true, Execute won’t be called until after Resume is called; if false, Execute is called immediately.
  • aName: Become the value of the Name property.

constructor Create (string, TComponent, Integer)  reintroduce

Creates the object instance and sets the specific parameters.

constructor Create(aName: string; aOwner: TComponent; aInterval: Integer)

Parameters:

  • aName: Name of the thread.
  • aOwner: Points to the component (for example the server) that has spawned this thread object.
  • aInterval: Time interval in seconds to perform the periodic action.

constructor Create (Boolean)    (declared in TROInitializedThread)

Creates a new class instance (standard thread class constructor).

constructor Create(CreateSuspended: Boolean)

Parameters:

  • CreateSuspended: When set to true, this parameter allows to create a thread that will not be started right after it is created. This allows to do some thread class configuration before the execution begins.

CheckForMessages  protected virtual abstract

This method is executed periodically by the thread. The method is abstract and must be overriden in descendants.

procedure CheckForMessages

DoTerminate  protected override    (declared in TROThread)

procedure DoTerminate

Execute  protected override    (declared in TROInitializedThread)

This method will be executed on the background thread, and should contain the user code. In this class, the Execute method must not be overridden in descendant classes, override IntExecute instead.

procedure Execute

Free  reintroduce    (declared in TROThread)

procedure Free

SetName  protected    (declared in TROThread)

procedure SetName(const aName: string)

Parameters:

  • aName:

TerminateWaitFor  override

Utility method that combines a call to Terminate with a subsequent call to WaitFor.

procedure TerminateWaitFor

WaitFor  reintroduce    (declared in TROThread)

Blocks the current thread until the current event receives a signal.

function WaitFor: Cardinal