Interface Interceptor<R>


public interface Interceptor<R>
Handler, which is used to finer control Readable.
Author:
Alexey Stashok
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    intercept(int event, Object context, R result)
    Callback method is called by Readable, so it is possible to customize reading process.
  • Field Details

  • Method Details

    • intercept

      int intercept(int event, Object context, R result)
      Callback method is called by Readable, so it is possible to customize reading process. Mostly Interceptor is used to control asynchronous reads.
      Parameters:
      event - type of intercepted event.
      context - read operation context.
      result - last read operation result.
      Returns:
      the implementation specific code to instruct Readable how it should continue reading operation.