Package com.alibaba.cloud.nacos.registry
Class NacosRegistration
java.lang.Object
com.alibaba.cloud.nacos.registry.NacosRegistration
- All Implemented Interfaces:
org.springframework.cloud.client.ServiceInstance,org.springframework.cloud.client.serviceregistry.Registration
public class NacosRegistration
extends Object
implements org.springframework.cloud.client.serviceregistry.Registration
- Author:
- xiaojing, changjin wei(魏昌进)
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNacosRegistration(List<NacosRegistrationCustomizer> registrationCustomizers, NacosDiscoveryProperties nacosDiscoveryProperties, org.springframework.context.ApplicationContext context) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.cloud.client.ServiceInstance
getInstanceId, getScheme
-
Field Details
-
MANAGEMENT_PORT
The metadata key of management port.- See Also:
-
MANAGEMENT_CONTEXT_PATH
The metadata key of management context-path.- See Also:
-
MANAGEMENT_ADDRESS
The metadata key of management address.- See Also:
-
MANAGEMENT_ENDPOINT_BASE_PATH
The metadata key of management endpoints web base path.- See Also:
-
-
Constructor Details
-
NacosRegistration
public NacosRegistration(List<NacosRegistrationCustomizer> registrationCustomizers, NacosDiscoveryProperties nacosDiscoveryProperties, org.springframework.context.ApplicationContext context)
-
-
Method Details
-
init
@PostConstruct public void init() -
customize
-
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
-
setPort
public void setPort(int port) -
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
-
isRegisterEnabled
public boolean isRegisterEnabled() -
getCluster
-
getRegisterWeight
public float getRegisterWeight() -
getNacosDiscoveryProperties
-
toString
-