你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

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