CommunicationListener Interface

public interface CommunicationListener

Defines the base interface and the state machine contract for the communication listener for a Service Fabric Service.

Method Summary

Modifier and Type Method and Description
void abort()
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.

Method Details

abort

public void 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.

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.

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