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 Details

    • MANAGEMENT_PORT

      public static final String MANAGEMENT_PORT
      The metadata key of management port.
      See Also:
    • MANAGEMENT_CONTEXT_PATH

      public static final String MANAGEMENT_CONTEXT_PATH
      The metadata key of management context-path.
      See Also:
    • MANAGEMENT_ADDRESS

      public static final String MANAGEMENT_ADDRESS
      The metadata key of management address.
      See Also:
    • MANAGEMENT_ENDPOINT_BASE_PATH

      public static final String MANAGEMENT_ENDPOINT_BASE_PATH
      The metadata key of management endpoints web base path.
      See Also:
  • Constructor Details

  • Method Details

    • init

      @PostConstruct public void init()
    • customize

      protected void customize(List<NacosRegistrationCustomizer> registrationCustomizers)
    • getServiceId

      public String getServiceId()
      Specified by:
      getServiceId in interface org.springframework.cloud.client.ServiceInstance
    • getHost

      public String getHost()
      Specified by:
      getHost in interface org.springframework.cloud.client.ServiceInstance
    • getPort

      public int getPort()
      Specified by:
      getPort in interface org.springframework.cloud.client.ServiceInstance
    • setPort

      public void setPort(int port)
    • isSecure

      public boolean isSecure()
      Specified by:
      isSecure in interface org.springframework.cloud.client.ServiceInstance
    • getUri

      public URI getUri()
      Specified by:
      getUri in interface org.springframework.cloud.client.ServiceInstance
    • getMetadata

      public Map<String,String> getMetadata()
      Specified by:
      getMetadata in interface org.springframework.cloud.client.ServiceInstance
    • isRegisterEnabled

      public boolean isRegisterEnabled()
    • getCluster

      public String getCluster()
    • getRegisterWeight

      public float getRegisterWeight()
    • getNacosDiscoveryProperties

      public NacosDiscoveryProperties getNacosDiscoveryProperties()
    • toString

      public String toString()
      Overrides:
      toString in class Object