Package io.micronaut.discovery
Class StaticServiceInstanceList
java.lang.Object
io.micronaut.discovery.StaticServiceInstanceList
- All Implemented Interfaces:
ServiceInstanceList
A
ServiceInstanceList
using a static list of URLs. This class doesn't support health checking.- Since:
- 1.0
- Author:
- graemerocher
-
Constructor Summary
ConstructorDescriptionStaticServiceInstanceList
(String id, Collection<URI> loadBalancedURIs) Default constructor.StaticServiceInstanceList
(String id, Collection<URI> loadBalancedURIs, @Nullable String contextPath) Default constructor. -
Method Summary
-
Constructor Details
-
StaticServiceInstanceList
Default constructor.- Parameters:
id
- The idloadBalancedURIs
- The URIs
-
StaticServiceInstanceList
public StaticServiceInstanceList(String id, Collection<URI> loadBalancedURIs, @Nullable @Nullable String contextPath) Default constructor.- Parameters:
id
- The idloadBalancedURIs
- The URIscontextPath
- The context path
-
-
Method Details
-
getID
- Specified by:
getID
in interfaceServiceInstanceList
- Returns:
- The service ID
-
getInstances
Description copied from interface:ServiceInstanceList
Returns the current list of services. Note: This method should NEVER block.- Specified by:
getInstances
in interfaceServiceInstanceList
- Returns:
- The instances
-
getLoadBalancedURIs
- Returns:
- The URIs that are load balanced
-
getContextPath
- Specified by:
getContextPath
in interfaceServiceInstanceList
- Returns:
- The context path to use for requests to the service.
-