public interface Interceptor<R>
Handler, which is used to finer control
Readable
.- Author:
- Alexey Stashok
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
-
Method Summary
-
Field Details
-
DEFAULT
static final int DEFAULT- See Also:
-
COMPLETED
static final int COMPLETED- See Also:
-
INCOMPLETED
static final int INCOMPLETED- See Also:
-
RESET
static final int RESET- See Also:
-
-
Method Details
-
intercept
Callback method is called byReadable
, so it is possible to customize reading process. MostlyInterceptor
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.
-