Top Description Methods
javax.servlet

public Interface ReadListener

extends EventListener
Imports
java.io.IOException, java.util.EventListener

This class represents a call-back mechanism that will notify implementations as HTTP request data becomes available to be read without blocking.

Since
Servlet 3.1

Method Summary

Modifier and TypeMethod and Description
public void
onAllDataRead()

Invoked when all data for the current request has been read.

public void
onDataAvailable()

When an instance of the ReadListener is registered with a ServletInputStream, this method will be invoked by the container the first time when it is possible to read data.

public void
onError(Throwable
the throwable to indicate why the read operation failed
t
)

Invoked when an error occurs processing the request.

Method Detail

onAllDataReadback to summary
public void onAllDataRead() throws IOException

Invoked when all data for the current request has been read.

Exceptions
IOException:
if an I/O related error has occurred during processing
onDataAvailableback to summary
public void onDataAvailable() throws IOException

When an instance of the ReadListener is registered with a ServletInputStream, 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 if the javax.servlet.ServletInputStream#isReady() method has been called and has returned a value of false and data has subsequently become available to read.

Exceptions
IOException:
if an I/O related error has occurred during processing
onErrorback to summary
public void onError(Throwable t)

Invoked when an error occurs processing the request.

Parameters
t:Throwable

the throwable to indicate why the read operation failed