java.lang.Object
io.jooby.GracefulShutdown
- All Implemented Interfaces:
Extension
Install a handler that at application shutdown time:
- Waits for existing requests to finished with an optional timeout - Incoming requests are resolved as Service Unavailable(503)
NOTE: This extension must be installed at very beginning of your route pipeline.
- Author:
- edgar
-
Constructor Summary
ConstructorDescriptionCreates a new shutdown handler and waits for existing request to finish.GracefulShutdown
(Duration await) Creates a new shutdown handler and waits for existing requests to finish or for specified amount of time. -
Method Summary
-
Constructor Details
-
GracefulShutdown
Creates a new shutdown handler and waits for existing requests to finish or for specified amount of time.- Parameters:
await
- Max time to wait for handlers to complete.
-
GracefulShutdown
public GracefulShutdown()Creates a new shutdown handler and waits for existing request to finish.
-
-
Method Details