ServiceEndpointCollection Class
- java.
lang. Object - Serializable
- microsoft.
servicefabric. services. communication. ServiceEndpointCollection
- microsoft.
public class ServiceEndpointCollection
This class represents the endpoints of a Reliable service. Each endpoint has a listener name and the address of that listener.
Constructor Summary
Constructor | Description |
---|---|
ServiceEndpointCollection() |
Instantiates an empty ServiceEndpointsCollection |
ServiceEndpointCollection(String listenerName, String endpointAddress) |
Instantiates the ServiceEndpointsCollection with a single endpoint, identified by the listener name. |
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
addEndpoint(String listenerName, String endpointAddress)
Adds the endpoints in the input EndpointsCollection class to the EndpointsCollection. |
void |
addEndpoints(ServiceEndpointCollection newEndpoints)
Adds the endpoints in the input EndpointsCollection class to the EndpointsCollection. |
String |
getEndpointAddress(String listenerName)
Gets the endpoint identified by the listener name. |
String |
getFirstEndpointAddress()
Gets the first endpoint address in the EndpointsCollection |
Service |
parseEndpointsString(String endpointsString)
Constructs an EndpointsCollection from a string version of the endpoints. String form of EndpointsCollection is of the form {"Endpoints":{"Listener1":"Endpoint1","Listener2":"Endpoint2" ...}} |
Map<String, String> |
toReadOnlyHashMap()
Sets the address of the user service replica to the address of read-only hashmap. |
String |
toString()
Converts the endpointsCollection to a JSON string of the form {"Endpoints":{"Listener1":"Endpoint1","Listener2":"Endpoint2" ...}} |
Constructor Details
ServiceEndpointCollection
public ServiceEndpointCollection()
Instantiates an empty ServiceEndpointsCollection
ServiceEndpointCollection
public ServiceEndpointCollection(String listenerName, String endpointAddress)
Instantiates the ServiceEndpointsCollection with a single endpoint, identified by the listener name.
Parameters:
Method Details
addEndpoint
public void addEndpoint(String listenerName, String endpointAddress)
Adds the endpoints in the input EndpointsCollection class to the EndpointsCollection.
Parameters:
Throws:
addEndpoints
public void addEndpoints(ServiceEndpointCollection newEndpoints)
Adds the endpoints in the input EndpointsCollection class to the EndpointsCollection.
Parameters:
Throws:
getEndpointAddress
public String getEndpointAddress(String listenerName)
Gets the endpoint identified by the listener name.
Parameters:
Returns:
getFirstEndpointAddress
public String getFirstEndpointAddress()
Gets the first endpoint address in the EndpointsCollection
Returns:
parseEndpointsString
public static ServiceEndpointCollection parseEndpointsString(String endpointsString)
Constructs an EndpointsCollection from a string version of the endpoints. String form of EndpointsCollection is of the form {"Endpoints":{"Listener1":"Endpoint1","Listener2":"Endpoint2" ...}}
Parameters:
Returns:
toReadOnlyHashMap
public Map
Sets the address of the user service replica to the address of read-only hashmap.
Returns:
toString
public String toString()
Converts the endpointsCollection to a JSON string of the form {"Endpoints":{"Listener1":"Endpoint1","Listener2":"Endpoint2" ...}}
Returns:
Applies to
Azure SDK for Java