org.glassfish.grizzly
Interface Interceptor<R>
public interface Interceptor<R>
Handler, which is used to finer control Readable.
- Author:
- Alexey Stashok
|
Method Summary |
int |
intercept(int event,
java.lang.Object context,
R result)
Callback method is called by Readable, so it is possible to
customize reading process. |
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
intercept
int intercept(int event,
java.lang.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.
Copyright © 2011 Oracle Corpration. All Rights Reserved.