Compartir vía


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