Top Description Fields Methods
org.glassfish.grizzly

public Interface Interceptor<R>

Known Direct Implementers
org.glassfish.grizzly.nio.transport.DefaultStreamReader.Input.InputInterceptor

Handler, which is used to finer control Readable.
Author
Alexey Stashok

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the implementation specific code to instruct Readable how it should continue reading operation.
intercept
(int
type of intercepted event.
event
,
Object
read operation context.
context
,
R
last read operation result.
result
)

Callback method is called by Readable, so it is possible to customize reading process.

Field Detail

COMPLETEDback to summary
public static final int COMPLETED
DEFAULTback to summary
public static final int DEFAULT
INCOMPLETEDback to summary
public static final int INCOMPLETED
RESETback to summary
public static final int RESET

Method Detail

interceptback to summary
public 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:int

type of intercepted event.

context:Object

read operation context.

result:R

last read operation result.

Returns:int

the implementation specific code to instruct Readable how it should continue reading operation.