ServiceRemotingMessageDispatcher.HandleRequestResponseAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
HandleRequestResponseAsync(IServiceRemotingRequestContext, IServiceRemotingRequestMessage) |
Handles a message from the client that requires a response from the service. |
HandleRequestResponseAsync(ServiceRemotingDispatchHeaders, IServiceRemotingRequestMessageBody, CancellationToken) |
Handles a message from the client that requires a response from the service. This Api can be used for the short-circuiting where client is in same process as service. Client can now directly dispatch request to service instead of using ServiceProxy. |
HandleRequestResponseAsync(IServiceRemotingRequestContext, IServiceRemotingRequestMessage)
Handles a message from the client that requires a response from the service.
public virtual System.Threading.Tasks.Task<Microsoft.ServiceFabric.Services.Remoting.V2.IServiceRemotingResponseMessage> HandleRequestResponseAsync (Microsoft.ServiceFabric.Services.Remoting.V2.Runtime.IServiceRemotingRequestContext requestContext, Microsoft.ServiceFabric.Services.Remoting.V2.IServiceRemotingRequestMessage requestMessage);
abstract member HandleRequestResponseAsync : Microsoft.ServiceFabric.Services.Remoting.V2.Runtime.IServiceRemotingRequestContext * Microsoft.ServiceFabric.Services.Remoting.V2.IServiceRemotingRequestMessage -> System.Threading.Tasks.Task<Microsoft.ServiceFabric.Services.Remoting.V2.IServiceRemotingResponseMessage>
override this.HandleRequestResponseAsync : Microsoft.ServiceFabric.Services.Remoting.V2.Runtime.IServiceRemotingRequestContext * Microsoft.ServiceFabric.Services.Remoting.V2.IServiceRemotingRequestMessage -> System.Threading.Tasks.Task<Microsoft.ServiceFabric.Services.Remoting.V2.IServiceRemotingResponseMessage>
Public Overridable Function HandleRequestResponseAsync (requestContext As IServiceRemotingRequestContext, requestMessage As IServiceRemotingRequestMessage) As Task(Of IServiceRemotingResponseMessage)
Parameters
- requestContext
- IServiceRemotingRequestContext
Request context - contains additional information about the request
- requestMessage
- IServiceRemotingRequestMessage
Request message
Returns
A Task representing the asynchronous operation. The result of the task is the response for the received request.
Implements
Applies to
HandleRequestResponseAsync(ServiceRemotingDispatchHeaders, IServiceRemotingRequestMessageBody, CancellationToken)
Handles a message from the client that requires a response from the service. This Api can be used for the short-circuiting where client is in same process as service. Client can now directly dispatch request to service instead of using ServiceProxy.
public virtual System.Threading.Tasks.Task<Microsoft.ServiceFabric.Services.Remoting.V2.IServiceRemotingResponseMessageBody> HandleRequestResponseAsync (Microsoft.ServiceFabric.Services.Remoting.V2.ServiceRemotingDispatchHeaders requestMessageDispatchHeaders, Microsoft.ServiceFabric.Services.Remoting.V2.IServiceRemotingRequestMessageBody requestMessageBody, System.Threading.CancellationToken cancellationToken);
abstract member HandleRequestResponseAsync : Microsoft.ServiceFabric.Services.Remoting.V2.ServiceRemotingDispatchHeaders * Microsoft.ServiceFabric.Services.Remoting.V2.IServiceRemotingRequestMessageBody * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.ServiceFabric.Services.Remoting.V2.IServiceRemotingResponseMessageBody>
override this.HandleRequestResponseAsync : Microsoft.ServiceFabric.Services.Remoting.V2.ServiceRemotingDispatchHeaders * Microsoft.ServiceFabric.Services.Remoting.V2.IServiceRemotingRequestMessageBody * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.ServiceFabric.Services.Remoting.V2.IServiceRemotingResponseMessageBody>
Public Overridable Function HandleRequestResponseAsync (requestMessageDispatchHeaders As ServiceRemotingDispatchHeaders, requestMessageBody As IServiceRemotingRequestMessageBody, cancellationToken As CancellationToken) As Task(Of IServiceRemotingResponseMessageBody)
Parameters
- requestMessageDispatchHeaders
- ServiceRemotingDispatchHeaders
Request message headers
- requestMessageBody
- IServiceRemotingRequestMessageBody
Request message body
- cancellationToken
- CancellationToken
Cancellation token. It can be used to cancel the request
Returns
A Task representing the asynchronous operation. The result of the task is the response for the received request.