Class KubernetesServiceInstance
java.lang.Object
org.springframework.cloud.kubernetes.commons.discovery.KubernetesServiceInstance
- All Implemented Interfaces:
org.springframework.cloud.client.ServiceInstance
public class KubernetesServiceInstance
extends Object
implements org.springframework.cloud.client.ServiceInstance
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionKubernetesServiceInstance(String instanceId, String serviceId, String host, int port, Map<String, String> metadata, Boolean secure) KubernetesServiceInstance(String instanceId, String serviceId, String host, int port, Map<String, String> metadata, Boolean secure, String namespace, String cluster) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetHost()intgetPort()getUri()inthashCode()booleanisSecure()voidsetCluster(String cluster) voidvoidsetInstanceId(String instanceId) voidsetMetadata(Map<String, String> metadata) voidsetNamespace(String namespace) voidsetPort(int port) voidvoidsetServiceId(String serviceId) voidtoString()
-
Field Details
-
NAMESPACE_METADATA_KEY
Key of the namespace metadata.- See Also:
-
-
Constructor Details
-
KubernetesServiceInstance
public KubernetesServiceInstance(String instanceId, String serviceId, String host, int port, Map<String, String> metadata, Boolean secure) - Parameters:
instanceId- the id of the instance.serviceId- the id of the service.host- the address where the service instance can be found.port- the port on which the service is running.metadata- a map containing metadata.secure- indicates whether or not the connection needs to be secure.
-
KubernetesServiceInstance
public KubernetesServiceInstance(String instanceId, String serviceId, String host, int port, Map<String, String> metadata, Boolean secure, String namespace, String cluster) - Parameters:
instanceId- the id of the instance.serviceId- the id of the service.host- the address where the service instance can be found.port- the port on which the service is running.metadata- a map containing metadata.secure- indicates whether or not the connection needs to be secure.namespace- the namespace of the service.cluster- the clust the service resides in.
-
KubernetesServiceInstance
public KubernetesServiceInstance()
-
-
Method Details
-
getInstanceId
- Specified by:
getInstanceIdin interfaceorg.springframework.cloud.client.ServiceInstance
-
getServiceId
- Specified by:
getServiceIdin interfaceorg.springframework.cloud.client.ServiceInstance
-
getHost
- Specified by:
getHostin interfaceorg.springframework.cloud.client.ServiceInstance
-
getPort
public int getPort()- Specified by:
getPortin interfaceorg.springframework.cloud.client.ServiceInstance
-
isSecure
public boolean isSecure()- Specified by:
isSecurein interfaceorg.springframework.cloud.client.ServiceInstance
-
getUri
- Specified by:
getUriin interfaceorg.springframework.cloud.client.ServiceInstance
-
getMetadata
- Specified by:
getMetadatain interfaceorg.springframework.cloud.client.ServiceInstance
-
getScheme
- Specified by:
getSchemein interfaceorg.springframework.cloud.client.ServiceInstance
-
getNamespace
-
getCluster
-
setInstanceId
-
setServiceId
-
setHost
-
setPort
public void setPort(int port) -
setUri
-
setSecure
-
setMetadata
-
setNamespace
-
setCluster
-
getSecure
-
equals
-
toString
-
hashCode
public int hashCode()
-