Package org.glassfish.grizzly
Interface ReadHandler
-
public interface ReadHandlerThis class represents a call-back mechanism that will notify implementations as more input data becomes available to read without blocking.
- Since:
- 2.2
-
-
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()Invoked when data is available to be read without blocking.voidonError(Throwable t)Invoked when an error occurs processing the request asynchronously.
-
-
-
Method Detail
-
onDataAvailable
void onDataAvailable() throws ExceptionInvoked when data is available to be read without blocking. Data must be consumed by the handler implementation before re-registering.
- Throws:
Exception-Exceptionmight be thrown by the custom handler code. This exception will be delegated for processing toonError(java.lang.Throwable).
-
onError
void onError(Throwable t)
Invoked when an error occurs processing the request asynchronously.
- Parameters:
t- the error
-
onAllDataRead
void onAllDataRead() throws ExceptionInvoked when all data for the current request has been read.
- Throws:
Exception-Exceptionmight be thrown by the custom handler code. This exception will be delegated for processing toonError(java.lang.Throwable).
-
-