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 intCOMPLETEDstatic intDEFAULTstatic intINCOMPLETEDstatic intRESET
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intintercept(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. MostlyInterceptoris 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
Readablehow it should continue reading operation.
-
-