Class NacosAutoServiceRegistration

java.lang.Object
org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<org.springframework.cloud.client.serviceregistry.Registration>
com.alibaba.cloud.nacos.registry.NacosAutoServiceRegistration
All Implemented Interfaces:
EventListener, org.springframework.beans.factory.Aware, org.springframework.cloud.client.serviceregistry.AutoServiceRegistration, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<org.springframework.boot.web.context.WebServerInitializedEvent>

public class NacosAutoServiceRegistration extends org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<org.springframework.cloud.client.serviceregistry.Registration>
Author:
xiaojing, Mercy
  • Constructor Details

    • NacosAutoServiceRegistration

      public NacosAutoServiceRegistration(org.springframework.cloud.client.serviceregistry.ServiceRegistry<org.springframework.cloud.client.serviceregistry.Registration> serviceRegistry, org.springframework.cloud.client.serviceregistry.AutoServiceRegistrationProperties autoServiceRegistrationProperties, NacosRegistration registration)
  • Method Details

    • setPort

      @Deprecated public void setPort(int port)
      Deprecated.
    • getRegistration

      protected NacosRegistration getRegistration()
      Specified by:
      getRegistration in class org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<org.springframework.cloud.client.serviceregistry.Registration>
    • getManagementRegistration

      protected NacosRegistration getManagementRegistration()
      Specified by:
      getManagementRegistration in class org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<org.springframework.cloud.client.serviceregistry.Registration>
    • register

      protected void register()
      Overrides:
      register in class org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<org.springframework.cloud.client.serviceregistry.Registration>
    • registerManagement

      protected void registerManagement()
      Overrides:
      registerManagement in class org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<org.springframework.cloud.client.serviceregistry.Registration>
    • getConfiguration

      protected Object getConfiguration()
      Specified by:
      getConfiguration in class org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<org.springframework.cloud.client.serviceregistry.Registration>
    • isEnabled

      protected boolean isEnabled()
      Specified by:
      isEnabled in class org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<org.springframework.cloud.client.serviceregistry.Registration>
    • getAppName

      protected String getAppName()
      Overrides:
      getAppName in class org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<org.springframework.cloud.client.serviceregistry.Registration>
    • onNacosDiscoveryInfoChangedEvent

      @EventListener public void onNacosDiscoveryInfoChangedEvent(NacosDiscoveryInfoChangedEvent event)