TROUDPResponseThread

Overview

The TROUDPResponseThread class is used internally by the TROIndyUDPChannel class to asynchronously invoke a TROIndyUDPChannel followed by TROIndyUDPChannel.DoTimeOut or TROIndyUDPChannel.DoEnd depending on the TROIndyUDPChannel result.

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 (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 (string, TROIndyUDPChannel, string)

Initializes a new instance with given parameters.

constructor Create(const aName: string; aChannel: TROIndyUDPChannel; aRequestUID: string)

Parameters:

  • aName: Thread name
  • aChannel: Thread initiator
  • aRequestUID: Distinguished request ID

Channel

The channel that initiated this thread.

property Channel: TROIndyUDPChannel read

CriticalSection

Allows to implement thread safe operations.

property CriticalSection: TCriticalSection read

DoEnd  protected

Calls TROIndyUDPChannel for Self and clears Channel.FRunningThread.

procedure DoEnd

DoReceiveResp  protected virtual

procedure DoReceiveResp

DoTerminate  protected override    (declared in TROThread)

procedure DoTerminate

DoTimeOut  protected

Calls Channel.DoAsyncThreadTimeOut for RequestUID.

procedure DoTimeOut

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

NeedToSynchonize

Corresponds to the TROIndyUDPChannel property. If true, calling of DoTimeOut or DoEnd is done through the TThread method.

property NeedToSynchonize: Boolean read write

ReceivedResponse

Indicates if Channel.CheckStatus returns true for RequestUID before the value of the Channel.Retrys was exceeded.

property ReceivedResponse: Boolean read

RequestUID

Used by the TROIndyUDPChannel to distinguish requests.

property RequestUID: 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

 

Channel

The channel that initiated this thread.

property Channel: TROIndyUDPChannel read

CriticalSection

Allows to implement thread safe operations.

property CriticalSection: TCriticalSection read

Name  protected    (declared in TROThread)

Sets a readable name for the thread.

property Name: string read

NeedToSynchonize

Corresponds to the TROIndyUDPChannel property. If true, calling of DoTimeOut or DoEnd is done through the TThread method.

property NeedToSynchonize: Boolean read write

ReceivedResponse

Indicates if Channel.CheckStatus returns true for RequestUID before the value of the Channel.Retrys was exceeded.

property ReceivedResponse: Boolean read

RequestUID

Used by the TROIndyUDPChannel to distinguish requests.

property RequestUID: 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 (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 (string, TROIndyUDPChannel, string)

Initializes a new instance with given parameters.

constructor Create(const aName: string; aChannel: TROIndyUDPChannel; aRequestUID: string)

Parameters:

  • aName: Thread name
  • aChannel: Thread initiator
  • aRequestUID: Distinguished request ID

DoEnd  protected

Calls TROIndyUDPChannel for Self and clears Channel.FRunningThread.

procedure DoEnd

DoReceiveResp  protected virtual

procedure DoReceiveResp

DoTerminate  protected override    (declared in TROThread)

procedure DoTerminate

DoTimeOut  protected

Calls Channel.DoAsyncThreadTimeOut for RequestUID.

procedure DoTimeOut

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