Interface OrderlyShutdownCapable

All Known Implementing Classes:
AbstractServerConnectionFactory, AbstractWebServiceInboundGateway, AmqpInboundChannelAdapter, BaseHttpInboundEndpoint, HttpRequestHandlingController, HttpRequestHandlingEndpointSupport, HttpRequestHandlingMessagingGateway, JmsInboundGateway, JmsMessageDrivenEndpoint, KafkaInboundGateway, KafkaMessageDrivenChannelAdapter, MarshallingWebServiceInboundGateway, SimpleWebServiceInboundGateway, TcpInboundGateway, TcpNetServerConnectionFactory, TcpNioServerConnectionFactory, TcpReceivingChannelAdapter, WebFluxInboundEndpoint

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

    Modifier and Type
    Method
    Description
    int
    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
    Called before shutdown begins.
  • Method Details

    • 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.