ActorServiceRemotingDispatcher Class

public class ActorServiceRemotingDispatcher extends ServiceRemotingDispatcher

Provides an implementation of ServiceRemotingMessageHandler that can dispatch messages to an actor service and to the actors hosted in the service.

Constructor Summary

Constructor Description
ActorServiceRemotingDispatcher(FabricActorService actorService)

Instantiates the ActorServiceRemotingDispatcher that can dispatch messages to an actor service and to the actors hosted in the service.

Method Summary

Modifier and Type Method and Description
CompletableFuture<byte[]> requestResponseAsync(ServiceRemotingRequestContext requestContext, ServiceRemotingMessageHeaders messageHeaders, byte[] requestBody)

Dispatches the messages received from the client to the actor service methods or the actor methods.

Inherited Members

Constructor Details

ActorServiceRemotingDispatcher

public ActorServiceRemotingDispatcher(FabricActorService actorService)

Instantiates the ActorServiceRemotingDispatcher that can dispatch messages to an actor service and to the actors hosted in the service.

Parameters:

actorService - An actor service instance.

Method Details

requestResponseAsync

public CompletableFuture requestResponseAsync(ServiceRemotingRequestContext requestContext, ServiceRemotingMessageHeaders messageHeaders, byte[] requestBody)

Dispatches the messages received from the client to the actor service methods or the actor methods.

Overrides:

ActorServiceRemotingDispatcher.requestResponseAsync(ServiceRemotingRequestContext requestContext, ServiceRemotingMessageHeaders messageHeaders, byte[] requestBody)

Parameters:

requestContext - Request context that allows getting the callback channel if required.
messageHeaders - Service remoting message headers
requestBody - serialized request body of the remoting message.

Returns:

that represents outstanding operation. The result of the CompletableFuture is the serialized response body.

Applies to