Class RegistrationApplicationListener
java.lang.Object
de.codecentric.boot.admin.client.registration.RegistrationApplicationListener
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean
public class RegistrationApplicationListener
extends Object
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
Listener responsible for starting and stopping the registration task when the
application is ready.
- Author:
- Johannes Edmeier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddestroy()voidonApplicationReady(org.springframework.boot.context.event.ApplicationReadyEvent event) voidonClosedContext(org.springframework.context.event.ContextClosedEvent event) voidsetAutoDeregister(boolean autoDeregister) voidsetAutoRegister(boolean autoRegister) voidsetRegisterPeriod(Duration registerPeriod) voidvoid
-
Constructor Details
-
RegistrationApplicationListener
-
-
Method Details
-
onApplicationReady
@EventListener @Order(2147483647) public void onApplicationReady(org.springframework.boot.context.event.ApplicationReadyEvent event) -
onClosedContext
@EventListener @Order(2147483647) public void onClosedContext(org.springframework.context.event.ContextClosedEvent event) -
startRegisterTask
public void startRegisterTask() -
stopRegisterTask
public void stopRegisterTask() -
setAutoDeregister
public void setAutoDeregister(boolean autoDeregister) -
setAutoRegister
public void setAutoRegister(boolean autoRegister) -
setRegisterPeriod
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean
-