Spring Integration

org.springframework.integration.context
Interface OrderlyShutdownCapable

All Known Implementing Classes:
AbstractServerConnectionFactory, AmqpInboundChannelAdapter, HttpRequestHandlingController, HttpRequestHandlingEndpointSupport, HttpRequestHandlingMessagingGateway, JmsMessageDrivenEndpoint, TcpInboundGateway, TcpNetServerConnectionFactory, TcpNioServerConnectionFactory, TcpReceivingChannelAdapter

public interface OrderlyShutdownCapable

Interface for components that wish to be considered for an orderly shutdown using management interfaces. beforeShutdown() will be called before schedulers, executors etc, are stopped. afterShutdown() is called after the shutdown delay.

Since:
2.2
Author:
Gary Russell

Method Summary
 int afterShutdown()
          Called after normal shutdown of schedulers, executors etc, and after the shutdown delay has elapsed, but before any forced shutdown of any remaining active scheduler/executor threads.Can optionally return the number of active messages still in process.
 int beforeShutdown()
          Called before shutdown begins.
 

Method Detail

beforeShutdown

int beforeShutdown()
Called before shutdown begins. Implementations should stop accepting new messages. Can optionally return the number of active messages in process.

Returns:
The number of active messages if available.

afterShutdown

int afterShutdown()
Called after normal shutdown of schedulers, executors etc, and after the shutdown delay has elapsed, but before any forced shutdown of any remaining active scheduler/executor threads.Can optionally return the number of active messages still in process.

Returns:
The number of active messages if available.

Spring Integration