TROEmailServerProcessMessageThread

Overview

The TROEmailServerProcessMessageThread object represents the thread that receives request messages with input data and processes and sends response messages with output data from the server to the client's email address. This class is used for the organization of multi-threaded message processing. If you want to organize multi-threading message processing on your server, you have to create a new TROEmailServerProcessMessageThread object in the main thread for each request message.

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 (TROCustomEmailServer, TStream, string, string)  reintroduce

Creates a new email server process message thread with the name TROEmailServer Message Processing Thread, the ownwe email server (aOwner), the input data (aRequest), the message GUID (aMessageID) and the client's email address (aFrom). The constructor saves the input parameters aOwner, aRequest, aMessageID and aFrom to the private variables fOwner, fRequest, fMessageID and fFrom, respectively.

constructor Create(aOwner: TROCustomEmailServer; aRequest: TStream; const aMessageID: string; const aFrom: string)

Parameters:

  • aOwner: Owner email server
  • aRequest: Input stream with data
  • aMessageID: Message GUID
  • aFrom: Client's email address

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.

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

SetName  protected    (declared in TROThread)

procedure SetName(const aName: string)

Parameters:

  • aName:

TerminateWaitFor  virtual    (declared in TROThread)

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

 

Name  protected    (declared in TROThread)

Sets a readable name for the thread.

property Name: string 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 (TROCustomEmailServer, TStream, string, string)  reintroduce

Creates a new email server process message thread with the name TROEmailServer Message Processing Thread, the ownwe email server (aOwner), the input data (aRequest), the message GUID (aMessageID) and the client's email address (aFrom). The constructor saves the input parameters aOwner, aRequest, aMessageID and aFrom to the private variables fOwner, fRequest, fMessageID and fFrom, respectively.

constructor Create(aOwner: TROCustomEmailServer; aRequest: TStream; const aMessageID: string; const aFrom: string)

Parameters:

  • aOwner: Owner email server
  • aRequest: Input stream with data
  • aMessageID: Message GUID
  • aFrom: Client's email address

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.

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  virtual    (declared in TROThread)

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