public class DefaultServiceInstance extends Object implements ServiceInstance
ServiceInstance.| Constructor and Description |
|---|
DefaultServiceInstance() |
DefaultServiceInstance(String serviceId,
String host,
int port,
boolean secure)
Deprecated.
- use other constructors
|
DefaultServiceInstance(String serviceId,
String host,
int port,
boolean secure,
Map<String,String> metadata)
Deprecated.
- use other constructors
|
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() |
void |
setHost(String host) |
void |
setInstanceId(String instanceId) |
void |
setPort(int port) |
void |
setServiceId(String serviceId) |
void |
setUri(URI uri) |
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 DefaultServiceInstance()
public static URI getUri(ServiceInstance instance)
instance - the ServiceInstance.public URI getUri()
getUri in interface ServiceInstancepublic Map<String,String> getMetadata()
getMetadata in interface ServiceInstancepublic 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 ServiceInstancepublic void setInstanceId(String instanceId)
public void setServiceId(String serviceId)
public void setHost(String host)
public void setPort(int port)
public void setUri(URI uri)
Copyright © 2021 Pivotal Software, Inc.. All rights reserved.