Package jakarta.servlet
Interface WriteListener
- All Superinterfaces:
EventListener
Receives notification of write events when using non-blocking IO.
- Since:
- Servlet 3.1
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Invoked if an error occurs while writing the response.void
Invoked when it it possible to write data without blocking.
-
Method Details
-
onWritePossible
Invoked when it it possible to write data without blocking. The container will invoke this method the first time for a request as soon as data can be written. Subsequent invocations will only occur if a call toServletOutputStream.isReady()
has returned false and it has since become possible to write data.- Throws:
IOException
- if an I/O error occurs while processing this event
-
onError
Invoked if an error occurs while writing the response.- Parameters:
throwable
- The throwable that represents the error that occurred
-