Class ConsulAutoServiceRegistration

java.lang.Object
org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>
org.springframework.cloud.consul.serviceregistry.ConsulAutoServiceRegistration
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 ConsulAutoServiceRegistration extends org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>
Author:
Spencer Gibb
  • Constructor Details

  • Method Details

    • getRegistration

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

      protected ConsulAutoRegistration getManagementRegistration()
      Specified by:
      getManagementRegistration in class org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>
    • start

      @Retryable(interceptor="consulRetryInterceptor") public void start()
      Overrides:
      start in class org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>
    • register

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

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

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

      protected void deregister()
      Overrides:
      deregister in class org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>
    • deregisterManagement

      protected void deregisterManagement()
      Overrides:
      deregisterManagement in class org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>
    • isEnabled

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

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

      public void onApplicationEvent(org.springframework.boot.web.context.WebServerInitializedEvent event)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.boot.web.context.WebServerInitializedEvent>
      Overrides:
      onApplicationEvent in class org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>