Interface Interceptor<R>


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

      • 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.