Class ConsulAutoServiceRegistrationListener
java.lang.Object
org.springframework.cloud.consul.serviceregistry.ConsulAutoServiceRegistrationListener
- All Implemented Interfaces:
EventListener,org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>,org.springframework.context.event.SmartApplicationListener,org.springframework.core.Ordered
public class ConsulAutoServiceRegistrationListener
extends Object
implements org.springframework.context.event.SmartApplicationListener
Auto registers service upon web server initialization.
- Author:
- Spencer Gibb
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionConsulAutoServiceRegistrationListener(ConsulAutoServiceRegistration autoServiceRegistration) -
Method Summary
Modifier and TypeMethodDescriptionintgetOrder()voidonApplicationEvent(org.springframework.context.ApplicationEvent applicationEvent) booleansupportsEventType(Class<? extends org.springframework.context.ApplicationEvent> eventType) booleansupportsSourceType(Class<?> sourceType) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecutionMethods inherited from interface org.springframework.context.event.SmartApplicationListener
getListenerId
-
Constructor Details
-
ConsulAutoServiceRegistrationListener
-
-
Method Details
-
supportsEventType
public boolean supportsEventType(Class<? extends org.springframework.context.ApplicationEvent> eventType) - Specified by:
supportsEventTypein interfaceorg.springframework.context.event.SmartApplicationListener
-
supportsSourceType
- Specified by:
supportsSourceTypein interfaceorg.springframework.context.event.SmartApplicationListener
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.ApplicationEvent applicationEvent) - Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered- Specified by:
getOrderin interfaceorg.springframework.context.event.SmartApplicationListener
-