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 Summary
Constructors Constructor Description ConsulAutoServiceRegistration(ConsulServiceRegistry serviceRegistry, org.springframework.cloud.client.serviceregistry.AutoServiceRegistrationProperties autoServiceRegistrationProperties, ConsulDiscoveryProperties properties, ConsulAutoRegistration registration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbind(org.springframework.boot.web.context.WebServerInitializedEvent event)protected voidderegister()protected voidderegisterManagement()protected StringgetAppName()protected ObjectgetConfiguration()protected ConsulAutoRegistrationgetManagementRegistration()protected ConsulAutoRegistrationgetRegistration()protected booleanisEnabled()protected voidregister()protected voidregisterManagement()voidstart()-
Methods inherited from class org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration
destroy, getContext, getEnvironment, getManagementPort, getManagementServiceId, getManagementServiceName, getOrder, getPhase, getPort, getRunning, getServiceRegistry, isAutoStartup, isRunning, onApplicationEvent, setApplicationContext, shouldRegisterManagement, stop
-
-
-
-
Constructor Detail
-
ConsulAutoServiceRegistration
public ConsulAutoServiceRegistration(ConsulServiceRegistry serviceRegistry, org.springframework.cloud.client.serviceregistry.AutoServiceRegistrationProperties autoServiceRegistrationProperties, ConsulDiscoveryProperties properties, ConsulAutoRegistration registration)
-
-
Method Detail
-
getRegistration
protected ConsulAutoRegistration getRegistration()
- Specified by:
getRegistrationin classorg.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>
-
getManagementRegistration
protected ConsulAutoRegistration getManagementRegistration()
- Specified by:
getManagementRegistrationin classorg.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>
-
start
@Retryable(interceptor="consulRetryInterceptor") public void start()
- Overrides:
startin classorg.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>
-
register
protected void register()
- Overrides:
registerin classorg.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>
-
registerManagement
protected void registerManagement()
- Overrides:
registerManagementin classorg.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>
-
getConfiguration
protected Object getConfiguration()
- Specified by:
getConfigurationin classorg.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>
-
deregister
protected void deregister()
- Overrides:
deregisterin classorg.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>
-
deregisterManagement
protected void deregisterManagement()
- Overrides:
deregisterManagementin classorg.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>
-
isEnabled
protected boolean isEnabled()
- Specified by:
isEnabledin classorg.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>
-
getAppName
protected String getAppName()
- Overrides:
getAppNamein classorg.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>
-
bind
public void bind(org.springframework.boot.web.context.WebServerInitializedEvent event)
- Overrides:
bindin classorg.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>
-
-