Class 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
    • Method Detail

      • 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>
      • bind

        public void bind​(org.springframework.boot.web.context.WebServerInitializedEvent event)
        Overrides:
        bind in class org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>