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
-
-
Constructor Summary
Constructors Constructor Description ConsulAutoServiceRegistrationListener(ConsulAutoServiceRegistration autoServiceRegistration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetOrder()voidonApplicationEvent(org.springframework.context.ApplicationEvent applicationEvent)booleansupportsEventType(Class<? extends org.springframework.context.ApplicationEvent> eventType)booleansupportsSourceType(Class<?> sourceType)
-
-
-
Constructor Detail
-
ConsulAutoServiceRegistrationListener
public ConsulAutoServiceRegistrationListener(ConsulAutoServiceRegistration autoServiceRegistration)
-
-
Method Detail
-
supportsEventType
public boolean supportsEventType(Class<? extends org.springframework.context.ApplicationEvent> eventType)
- Specified by:
supportsEventTypein interfaceorg.springframework.context.event.SmartApplicationListener
-
supportsSourceType
public boolean supportsSourceType(Class<?> sourceType)
- 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
-
-