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)    (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, 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 write

CriticalSection

Allows to implement thread safe operations.

property CriticalSection: TCriticalSection read write

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 write

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 write

RequestUID

Used by the TROIndyUDPChannel to distinguish requests.

property RequestUID: string read write

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 write

CriticalSection

Allows to implement thread safe operations.

property CriticalSection: TCriticalSection read write

Name  protected    (declared in TROThread)

Sets a readable name for the thread.

property Name: string read write

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 write

RequestUID

Used by the TROIndyUDPChannel to distinguish requests.

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

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

Descendants

See Also