INT-2483 implemented orderly shutdown of many components. There are three (known) remaining issues...
1. Tcp Adapters are stopped hard - sockets closed. This means that any in-flight TCP request/response scenarios will fail (because the reply cannot be written).
2. UDP adapters may cause error messages (executor threads may be interrupted).
3. No attempt is made for orderly shutdown of messages running on external (e.g. container) threads, such as http inbound endpoints.
Suggest adding two methods to the OrderlyShutdownCapable interface
beginShutdown() can then be used to inform endpoints such as those above (http, tcp) to not accept any more incoming requests, while leaving in-flight requests in process time to quiesce.
endShutdown() can be called after the shutdown delay to attempt to force stop the TCP endpoints and report if http requests are still in-flight.