public class DefaultServiceInstance extends Object implements ServiceInstance
ServiceInstance
.Constructor and Description |
---|
DefaultServiceInstance() |
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, wait
getScheme
public 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.public DefaultServiceInstance()
public static URI getUri(ServiceInstance instance)
instance
- the ServiceInstance.public URI getUri()
getUri
in interface ServiceInstance
public Map<String,String> getMetadata()
getMetadata
in interface ServiceInstance
public String getInstanceId()
getInstanceId
in interface ServiceInstance
public String getServiceId()
getServiceId
in interface ServiceInstance
public String getHost()
getHost
in interface ServiceInstance
public int getPort()
getPort
in interface ServiceInstance
public boolean isSecure()
isSecure
in interface ServiceInstance
public 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 © 2020 Pivotal Software, Inc.. All rights reserved.