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

ServiceInstanceListener Class

  • java.lang.Object
    • microsoft.servicefabric.services.communication.runtime.ServiceInstanceListener

public class ServiceInstanceListener

Represents the communication listener and its properties for a Stateless Service Instance. Endpoints given out by the communication listener are associated with name of the communication listener.

Field Summary

Modifier and Type Field and Description
final String defaultName

The default name used when the ServiceInstanceListener is not given a name.

Constructor Summary

Constructor Description
ServiceInstanceListener(Function<StatelessServiceContext, CommunicationListener> createCommunicationListener)
ServiceInstanceListener(Function<StatelessServiceContext, CommunicationListener> createCommunicationListener, String name)

Creates the ServiceInstanceListener

Method Summary

Modifier and Type Method and Description
Function<StatelessServiceContext, CommunicationListener> getCommunicationListenerFactory()

Factory method for creating the communication listener.

String getName()

Name of the communication listener.

Field Details

defaultName

public static final String defaultName= ""

The default name used when the ServiceInstanceListener is not given a name.

Constructor Details

ServiceInstanceListener

public ServiceInstanceListener(Function createCommunicationListener)

Parameters:

createCommunicationListener

ServiceInstanceListener

public ServiceInstanceListener(Function createCommunicationListener, String name)

Creates the ServiceInstanceListener

Parameters:

createCommunicationListener - Factory method for creating the communication listener
name - Name of the communication listener. This parameter is optional, if the service has only one communication listener

Method Details

getCommunicationListenerFactory

public Function getCommunicationListenerFactory()

Factory method for creating the communication listener.

Returns:

Factory method

getName

public String getName()

Name of the communication listener.

Returns:

Name

Applies to