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 simple
isShuttingDown() 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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidonApplicationEvent(org.springframework.context.event.ApplicationContextEvent event) voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) 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
supportsAsyncExecution
-
Constructor Details
-
ShutdownIndicator
public ShutdownIndicator()
-
-
Method Details
-
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>
-