ServiceRemotingDispatcher Class
- java.
lang. Object - ServiceRemotingMessageHandler
- microsoft.
servicefabric. services. remoting. runtime. ServiceRemotingDispatcher
- microsoft.
public class ServiceRemotingDispatcher implements ServiceRemotingMessageHandler
Provides an implementation of ServiceRemotingMessageHandler that can dispatch messages to the service implementing Service interface.
Constructor Summary
Constructor | Description |
---|---|
ServiceRemotingDispatcher(ServiceContext serviceContext, Service service) |
Instantiates the ServiceRemotingDispatcher that uses the given service context and dispatches messages to the given service implementation. |
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
handleOneWay(ServiceRemotingRequestContext requestContext, ServiceRemotingMessageHeaders messageHeaders, byte[] requestBody)
Handles a one way message from the client. |
CompletableFuture<byte[]> |
requestResponseAsync(ServiceRemotingRequestContext requestContext, ServiceRemotingMessageHeaders messageHeaders, byte[] requestBody)
Handles a message from the client that requires a response from the service. |
Constructor Details
ServiceRemotingDispatcher
public ServiceRemotingDispatcher(ServiceContext serviceContext, Service service)
Instantiates the ServiceRemotingDispatcher that uses the given service context and dispatches messages to the given service implementation.
Parameters:
Method Details
handleOneWay
public void handleOneWay(ServiceRemotingRequestContext requestContext, ServiceRemotingMessageHeaders messageHeaders, byte[] requestBody)
Handles a one way message from the client.
Overrides:
ServiceRemotingDispatcher.handleOneWay(ServiceRemotingRequestContext requestContext, ServiceRemotingMessageHeaders messageHeaders, byte[] requestBody)Parameters:
requestResponseAsync
public CompletableFuture
Handles a message from the client that requires a response from the service.
Overrides:
ServiceRemotingDispatcher.requestResponseAsync(ServiceRemotingRequestContext requestContext, ServiceRemotingMessageHeaders messageHeaders, byte[] requestBody)Parameters:
Returns:
Applies to
Azure SDK for Java