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
ConstructorsConstructorDescriptionConsulAutoServiceRegistration(ConsulServiceRegistry serviceRegistry, org.springframework.cloud.client.serviceregistry.AutoServiceRegistrationProperties autoServiceRegistrationProperties, ConsulDiscoveryProperties properties, ConsulAutoRegistration registration) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidprotected Stringprotected Objectprotected ConsulAutoRegistrationprotected ConsulAutoRegistrationprotected booleanvoidonApplicationEvent(org.springframework.boot.web.context.WebServerInitializedEvent event) protected voidregister()protected voidvoidstart()Methods inherited from class org.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration
addRegistrationLifecycle, addRegistrationManagementLifecycle, destroy, getContext, getEnvironment, getManagementPort, getManagementServiceId, getManagementServiceName, getOrder, getPhase, getPort, getRunning, getServiceRegistry, isAutoStartup, isRunning, setApplicationContext, shouldRegisterManagement, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution
-
Constructor Details
-
ConsulAutoServiceRegistration
public ConsulAutoServiceRegistration(ConsulServiceRegistry serviceRegistry, org.springframework.cloud.client.serviceregistry.AutoServiceRegistrationProperties autoServiceRegistrationProperties, ConsulDiscoveryProperties properties, ConsulAutoRegistration registration)
-
-
Method Details
-
getRegistration
- Specified by:
getRegistrationin classorg.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>
-
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
- 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
- Overrides:
getAppNamein classorg.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>
-
onApplicationEvent
public void onApplicationEvent(org.springframework.boot.web.context.WebServerInitializedEvent event) - Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.boot.web.context.WebServerInitializedEvent>- Overrides:
onApplicationEventin classorg.springframework.cloud.client.serviceregistry.AbstractAutoServiceRegistration<ConsulRegistration>
-