List of usage examples for org.springframework.integration.context OrderlyShutdownCapable beforeShutdown
int beforeShutdown();
From source file:hello.MetricsActivator.java
protected final void orderlyShutdownCapableComponentsBefore() { logger.debug("Initiating stop OrderlyShutdownCapable components"); Map<String, OrderlyShutdownCapable> components = this.applicationContext .getBeansOfType(OrderlyShutdownCapable.class); for (Entry<String, OrderlyShutdownCapable> componentEntry : components.entrySet()) { OrderlyShutdownCapable component = componentEntry.getValue(); int n = component.beforeShutdown(); if (logger.isInfoEnabled()) { logger.info(//from w ww . j ava 2 s. c om "Initiated stop for component " + component + "; it reported " + n + " active messages"); } } logger.debug("Initiated stop OrderlyShutdownCapable components"); }