Interface ReadListener
-
interface ReadListenerThis class represents a call-back mechanism that will notify implementations as HTTP request data becomes available to be read without blocking.
Taken from Servlet 3.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonAllDataRead()Invoked when all data for the current request has been read.voidonDataAvailable()When an instance of theReadListeneris registered with aBodyInputStream, this method will be invoked by the container the first time when it is possible to read data.voidonError(java.lang.Throwable t)Invoked when an error occurs processing the request.
-
-
-
Method Detail
-
onDataAvailable
void onDataAvailable() throws java.io.IOExceptionWhen an instance of theReadListeneris registered with aBodyInputStream, this method will be invoked by the container the first time when it is possible to read data. Subsequently the container will invoke this method if and only ifBodyInputStream.isReady()method has been called and has returnedfalse.- Throws:
java.io.IOException- if an I/O related error has occurred during processing
-
onAllDataRead
void onAllDataRead() throws java.io.IOExceptionInvoked when all data for the current request has been read.- Throws:
java.io.IOException- if an I/O related error has occurred during processing
-
onError
void onError(java.lang.Throwable t)
Invoked when an error occurs processing the request.
-
-