|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Reader<L>
Implementations of this interface are able to read data from
Connection to a Buffer.
There are two basic Reader implementations in Grizzly:
AsyncQueueReader,
TemporarySelectorReader.
| Field Summary | |
|---|---|
static int |
COMPLETE_EVENT
|
static int |
INCOMPLETE_EVENT
|
static int |
READ_EVENT
|
| Method Summary | |
|---|---|
GrizzlyFuture<ReadResult<Buffer,L>> |
read(Connection connection)
Method reads data. |
GrizzlyFuture<ReadResult<Buffer,L>> |
read(Connection connection,
Buffer buffer)
Method reads data to the buffer. |
GrizzlyFuture<ReadResult<Buffer,L>> |
read(Connection connection,
Buffer buffer,
CompletionHandler<ReadResult<Buffer,L>> completionHandler)
Method reads data to the buffer. |
GrizzlyFuture<ReadResult<Buffer,L>> |
read(Connection connection,
Buffer buffer,
CompletionHandler<ReadResult<Buffer,L>> completionHandler,
Interceptor<ReadResult> interceptor)
Method reads data to the buffer. |
| Field Detail |
|---|
static final int READ_EVENT
static final int COMPLETE_EVENT
static final int INCOMPLETE_EVENT
| Method Detail |
|---|
GrizzlyFuture<ReadResult<Buffer,L>> read(Connection connection)
throws java.io.IOException
connection - the Connection to read from
Future, using which it's possible to check the result
java.io.IOException
GrizzlyFuture<ReadResult<Buffer,L>> read(Connection connection,
Buffer buffer)
throws java.io.IOException
connection - the Connection to read frombuffer - the buffer, where data will be read
Future, using which it's possible to check the result
java.io.IOException
GrizzlyFuture<ReadResult<Buffer,L>> read(Connection connection,
Buffer buffer,
CompletionHandler<ReadResult<Buffer,L>> completionHandler)
throws java.io.IOException
connection - the Connection to read frombuffer - the buffer, where data will be readcompletionHandler - CompletionHandler,
which will get notified, when read will be completed
Future, using which it's possible to check the result
java.io.IOException
GrizzlyFuture<ReadResult<Buffer,L>> read(Connection connection,
Buffer buffer,
CompletionHandler<ReadResult<Buffer,L>> completionHandler,
Interceptor<ReadResult> interceptor)
throws java.io.IOException
connection - the Connection to read frombuffer - the Buffer to which data will be readcompletionHandler - CompletionHandler,
which will get notified, when read will be completedinterceptor - Interceptor, which will be able to intercept
control each time new portion of a data was read to a
buffer.
The interceptor can decide, whether asynchronous read is
completed or not, or provide other processing instructions.
Future, using which it's possible to check the result
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||