Invoked when the suspended asynchronous response is about to time out. Implementing time-out handlers may use the callback method to change the default time-out strategy defined by JAX-RS specification (see {@link javax.ws.rs.container.AsyncResponse} API documentation).
A custom time-out handler may decide to either
- resume the suspended response using one of it's {@code resume(...)} methods,
- cancel the suspended response using one of it's {@code cancel(...)} methods, or
- extend the suspend period by {@link AsyncResponse#setTimeout(long,java.util.concurrent.TimeUnit) setting a new suspend time-out}
In case the time-out handler does not take any of the actions mentioned above, a default time-out strategy is executed by the JAX-RS runtime.
@param asyncResponse suspended asynchronous response that is timing out.