public class DefaultServiceInstance extends Object implements ServiceInstance
ServiceInstance.| Constructor and Description |
|---|
DefaultServiceInstance(String serviceId,
String host,
int port,
boolean secure)
Deprecated.
|
DefaultServiceInstance(String serviceId,
String host,
int port,
boolean secure,
Map<String,String> metadata)
Deprecated.
|
DefaultServiceInstance(String instanceId,
String serviceId,
String host,
int port,
boolean secure) |
DefaultServiceInstance(String instanceId,
String serviceId,
String host,
int port,
boolean secure,
Map<String,String> metadata) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getHost() |
String |
getInstanceId() |
Map<String,String> |
getMetadata() |
int |
getPort() |
String |
getServiceId() |
URI |
getUri() |
static URI |
getUri(ServiceInstance instance)
Creates a URI from the given ServiceInstance's host:port.
|
int |
hashCode() |
boolean |
isSecure() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetSchemepublic DefaultServiceInstance(String instanceId, String serviceId, String host, int port, boolean secure, Map<String,String> metadata)
instanceId - the id of the instance.serviceId - the id of the service.host - the host where the service instance can be found.port - the port on which the service is running.secure - indicates whether or not the connection needs to be secure.metadata - a map containing metadata.public DefaultServiceInstance(String instanceId, String serviceId, String host, int port, boolean secure)
instanceId - the id of the instance.serviceId - the id of the service.host - the host where the service instance can be found.port - the port on which the service is running.secure - indicates whether or not the connection needs to be secure.@Deprecated public DefaultServiceInstance(String serviceId, String host, int port, boolean secure, Map<String,String> metadata)
serviceId - the id of the service.host - the host where the service instance can be found.port - the port on which the service is running.secure - indicates whether or not the connection needs to be secure.metadata - a map containing metadata.@Deprecated public DefaultServiceInstance(String serviceId, String host, int port, boolean secure)
serviceId - the id of the service.host - the host where the service instance can be found.port - the port on which the service is running.secure - indicates whether or not the connection needs to be secure.public URI getUri()
getUri in interface ServiceInstancepublic Map<String,String> getMetadata()
getMetadata in interface ServiceInstancepublic static URI getUri(ServiceInstance instance)
instance - the ServiceInstance.public String getInstanceId()
getInstanceId in interface ServiceInstancepublic String getServiceId()
getServiceId in interface ServiceInstancepublic String getHost()
getHost in interface ServiceInstancepublic int getPort()
getPort in interface ServiceInstancepublic boolean isSecure()
isSecure in interface ServiceInstanceCopyright © 2019 Pivotal Software, Inc.. All rights reserved.