Package org.alfresco.util
Class ShutdownIndicator
- java.lang.Object
-
- org.alfresco.util.ShutdownIndicator
-
- All Implemented Interfaces:
EventListener,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener<org.springframework.context.event.ApplicationContextEvent>
public class ShutdownIndicator extends Object implements org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<org.springframework.context.event.ApplicationContextEvent>
Listens to ApplicationEvents to provide a simpleisShuttingDown()method, so callers don't need to be Spring beans or listen to these events themselves. Intended for use by code that wishes to avoid ERROR log messages on shutdown.- Author:
- adavis
-
-
Constructor Summary
Constructors Constructor Description ShutdownIndicator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisShuttingDown()voidonApplicationEvent(org.springframework.context.event.ApplicationContextEvent event)voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
-
-
Method Detail
-
isShuttingDown
public boolean isShuttingDown()
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ApplicationContextEvent event)
- Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ApplicationContextEvent>
-
-