다음을 통해 공유


ChannelResponseQueue Class

Definition

Producer/consumer queue to read Activities sent by the Adapter during asynchronous background requests such as DeliveryMode.Stream/ExpectReplies.

public class ChannelResponseQueue
type ChannelResponseQueue = class
Public Class ChannelResponseQueue
Inheritance
ChannelResponseQueue

Remarks

StartHandlerForRequest and HandleResponsesAsync are called from the request thread. SendActivitiesAsync would ultimately be called from the background thread as Activities are sent through Adapter. CompleteHandlerForRequest is used to signal the queue for the request is complete and not further Activities will be queued.

Constructors

ChannelResponseQueue(ILogger)

Producer/consumer queue to read Activities sent by the Adapter during asynchronous background requests such as DeliveryMode.Stream/ExpectReplies.

Methods

CompleteHandlerForRequest(String)

Completes channel response handling. This will wait for all reads to complete. Once complete, any subsequent SendActivitiesAsync are ignored.

HandleResponsesAsync(String, Action<IActivity>, CancellationToken)

Processes queued responses. This blocks until CompleteHandlerForRequest is called.

SendActivitiesAsync(String, IActivity[], CancellationToken)

Called by the background processing to queue Activities. This will signal HandleResponsesAsync to process the Activities.

StartHandlerForRequest(String)

Starts the queue for a request. This MUST be called before background processing starts.

Applies to