Interface ServiceInstance
- All Known Subinterfaces:
Registration
- All Known Implementing Classes:
DefaultServiceInstance
public interface ServiceInstance
Represents an instance of a service in a discovery system.
- Author:
- Spencer Gibb, Tim Ysewyn
-
Method Details
-
getInstanceId
- Returns:
- The unique instance ID as registered.
-
getServiceId
String getServiceId()- Returns:
- The service ID as registered.
-
getHost
String getHost()- Returns:
- The hostname of the registered service instance.
-
getPort
int getPort()- Returns:
- The port of the registered service instance.
-
isSecure
boolean isSecure()- Returns:
- Whether the port of the registered service instance uses HTTPS.
-
getUri
URI getUri()- Returns:
- The service URI address.
-
getMetadata
-
getScheme
- Returns:
- The scheme of the service instance.
-
createUri
Creates a URI from the given ServiceInstance's host:port.- Parameters:
instance- the ServiceInstance.- Returns:
- URI of the form (secure)?https:http + "host:port". Scheme port default used if port not set.
-