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)    (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.

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

Initializes the instance with the given arguments.

constructor Create(iCreateSuspended: Boolean; const iName: string)

Parameters:

  • iCreateSuspended: If true, Execute won’t be called until after Resume is called; if false, Execute is called immediately.
  • iName: 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; iInterval: integer)

Parameters:

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

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 write

Owner  protected

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

property Owner: TComponent read write

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 write

Owner  protected

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

property Owner: TComponent read write

 

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.

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

Initializes the instance with the given arguments.

constructor Create(iCreateSuspended: Boolean; const iName: string)

Parameters:

  • iCreateSuspended: If true, Execute won’t be called until after Resume is called; if false, Execute is called immediately.
  • iName: 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; iInterval: integer)

Parameters:

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

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

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

Descendants