Interface ReadHandler


public interface ReadHandler

This 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

    Modifier and Type
    Method
    Description
    void
    Invoked when all data for the current request has been read.
    void
    Invoked when data is available to be read without blocking.
    void
    Invoked when an error occurs processing the request asynchronously.
  • Method Details

    • onDataAvailable

      void onDataAvailable() throws Exception

      Invoked when data is available to be read without blocking. Data must be consumed by the handler implementation before re-registering.

      Throws:
      Exception - Exception might be thrown by the custom handler code. This exception will be delegated for processing to onError(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 Exception

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

      Throws:
      Exception - Exception might be thrown by the custom handler code. This exception will be delegated for processing to onError(java.lang.Throwable).