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 TypeMethodDescriptionboolean
void
onApplicationEvent
(org.springframework.context.event.ApplicationContextEvent event) void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext)
-
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:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ApplicationContextEvent event) - Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ApplicationContextEvent>
-