FabricTransportServiceRemotingListener Class

public class FabricTransportServiceRemotingListener implements ServiceRemotingListener

An ServiceRemotingListener that uses fabric TCP transport to provide interface remoting for stateless and stateful services.

Constructor Summary

Constructor Description
FabricTransportServiceRemotingListener(ServiceContext serviceContext, Service serviceImplementation)

Constructs a fabric transport based service remoting listener.

FabricTransportServiceRemotingListener(ServiceContext serviceContext, Service serviceImplementation, FabricTransportRemotingListenerSettings listenerSettings)

Constructs a fabric transport based service remoting listener that uses the specified settings.

FabricTransportServiceRemotingListener(ServiceContext serviceContext, Service serviceImplementation, String listenerSettingsConfigSectionName)

Constructs a fabric Transport based service remoting listener.

FabricTransportServiceRemotingListener(ServiceContext serviceContext, ServiceRemotingMessageHandler messageHandler)

Constructs a fabric transport based service remoting listener.

FabricTransportServiceRemotingListener(ServiceContext serviceContext, ServiceRemotingMessageHandler messageHandler, FabricTransportRemotingListenerSettings listenerSettings)

Constructs a fabric Transport based service remoting listener.

FabricTransportServiceRemotingListener(ServiceContext serviceContext, ServiceRemotingMessageHandler messageHandler, String listenerSettingsConfigSectionName)

Constructs a fabric transport based service remoting listener.

Method Summary

Modifier and Type Method and Description
void abort()

This method causes the communication listener to close. Close is a terminal state and this method causes the transition to close ungracefully. Any outstanding operations (including close) should be canceled when this method is called.

CompletableFuture<?> closeAsync(CancellationToken cancellationToken)

This method causes the communication listener to close. Close is a terminal state and this method allows the communication listener to transition to this state in a graceful manner.

CompletableFuture<String> openAsync(CancellationToken cancellationToken)

This method causes the communication listener to be opened. Once the Open completes, the communication listener becomes usable - accepts and sends messages.

Constructor Details

FabricTransportServiceRemotingListener

public FabricTransportServiceRemotingListener(ServiceContext serviceContext, Service serviceImplementation)

Constructs a fabric transport based service remoting listener.

Parameters:

serviceContext - The context of the service for which the remoting listener is being constructed.
serviceImplementation - The service implementation object.

FabricTransportServiceRemotingListener

public FabricTransportServiceRemotingListener(ServiceContext serviceContext, Service serviceImplementation, FabricTransportRemotingListenerSettings listenerSettings)

Constructs a fabric transport based service remoting listener that uses the specified settings.

Parameters:

serviceContext - The context of the service for which the remoting listener is being constructed.
serviceImplementation - The service implementation object.
listenerSettings - The settings for the listener.

FabricTransportServiceRemotingListener

public FabricTransportServiceRemotingListener(ServiceContext serviceContext, Service serviceImplementation, String listenerSettingsConfigSectionName)

Constructs a fabric Transport based service remoting listener.

Parameters:

serviceContext - The context of the service for which the remoting listener is being constructed.
serviceImplementation - The service implementation object.
listenerSettingsConfigSectionName - The name of the configuration section in the configuration package named "Config" in the service manifest that defines the settings for the listener.

FabricTransportServiceRemotingListener

public FabricTransportServiceRemotingListener(ServiceContext serviceContext, ServiceRemotingMessageHandler messageHandler)

Constructs a fabric transport based service remoting listener.

Parameters:

serviceContext - The context of the service for which the remoting listener is being constructed.
messageHandler - The handler for processing remoting messages. As the messages are received, the listener delivers them to this handler.

FabricTransportServiceRemotingListener

public FabricTransportServiceRemotingListener(ServiceContext serviceContext, ServiceRemotingMessageHandler messageHandler, FabricTransportRemotingListenerSettings listenerSettings)

Constructs a fabric Transport based service remoting listener.

Parameters:

serviceContext - The context of the service for which the remoting listener is being constructed.
messageHandler - The name of the configuration section in the configuration package named "Config" in the service manifest that defines the settings for the listener.
listenerSettings - The service implementation object.

FabricTransportServiceRemotingListener

public FabricTransportServiceRemotingListener(ServiceContext serviceContext, ServiceRemotingMessageHandler messageHandler, String listenerSettingsConfigSectionName)

Constructs a fabric transport based service remoting listener.

Parameters:

serviceContext - The context of the service for which the remoting listener is being constructed.
messageHandler - The handler for processing remoting messages. As the messages are received, the listener delivers them to this handler.
listenerSettingsConfigSectionName - The name of the configuration section in the configuration package named "Config" in the service manifest that defines the settings for the listener.

Method Details

abort

public void abort()

This method causes the communication listener to close. Close is a terminal state and this method causes the transition to close ungracefully. Any outstanding operations (including close) should be canceled when this method is called.

Overrides:

FabricTransportServiceRemotingListener.abort()

closeAsync

public CompletableFuture closeAsync(CancellationToken cancellationToken)

This method causes the communication listener to close. Close is a terminal state and this method allows the communication listener to transition to this state in a graceful manner.

Overrides:

FabricTransportServiceRemotingListener.closeAsync(CancellationToken cancellationToken)

Parameters:

cancellationToken -

CancellationToken object to indicate the cancellation status of the operation.

Returns:

A CompletableFuture that represents outstanding operation.

openAsync

public CompletableFuture openAsync(CancellationToken cancellationToken)

This method causes the communication listener to be opened. Once the Open completes, the communication listener becomes usable - accepts and sends messages.

Overrides:

FabricTransportServiceRemotingListener.openAsync(CancellationToken cancellationToken)

Parameters:

cancellationToken -

CancellationToken object to indicate the cancellation status of the operation.

Returns:

A CompletableFuture that represents outstanding operation. The result of the Task is the endpoint string.

Applies to