Package org.glassfish.grizzly
Interface Interceptor<R>
-
public interface Interceptor<R>
Handler, which is used to finer controlReadable
.- Author:
- Alexey Stashok
-
-
Field Summary
Fields Modifier and Type Field Description static int
COMPLETED
static int
DEFAULT
static int
INCOMPLETED
static int
RESET
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
intercept(int event, Object context, R result)
Callback method is called byReadable
, so it is possible to customize reading process.
-
-
-
Field Detail
-
DEFAULT
static final int DEFAULT
- See Also:
- Constant Field Values
-
COMPLETED
static final int COMPLETED
- See Also:
- Constant Field Values
-
INCOMPLETED
static final int INCOMPLETED
- See Also:
- Constant Field Values
-
RESET
static final int RESET
- See Also:
- Constant Field Values
-
-
Method Detail
-
intercept
int intercept(int event, Object context, R result)
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.
-
-