Jaa


CloudAdapterBase.GetStreamingConnectorFactory(Activity) Method

Definition

Gets the correct streaming connector factory that is processing the given activity.

protected virtual Microsoft.Bot.Connector.Authentication.ConnectorFactory GetStreamingConnectorFactory (Microsoft.Bot.Schema.Activity activity);
abstract member GetStreamingConnectorFactory : Microsoft.Bot.Schema.Activity -> Microsoft.Bot.Connector.Authentication.ConnectorFactory
override this.GetStreamingConnectorFactory : Microsoft.Bot.Schema.Activity -> Microsoft.Bot.Connector.Authentication.ConnectorFactory
Protected Overridable Function GetStreamingConnectorFactory (activity As Activity) As ConnectorFactory

Parameters

activity
Activity

The activity that is being processed.

Returns

The Streaming Connector Factory responsible for processing the activity.

Remarks

For HTTP requests, we usually create a new connector factory and reply to the activity over a new HTTP request. However, when processing activities over a streaming connection, we need to reply over the same connection that is talking to a web socket. This method will look up all active streaming connections in cloud adapter and return the connector factory that is processing the activity. Messages between bot and channel go through the StreamingConnection (bot -> channel) and RequestHandler (channel -> bot), both created by the adapter. However, proactive messages don't know which connection to talk to, so this method is designed to aid in the connection resolution for such proactive messages.

Applies to