public abstract class AbstractReader<L> extends Object implements Reader<L>
Reader
methods.COMPLETE_EVENT, INCOMPLETE_EVENT, READ_EVENT
Constructor and Description |
---|
AbstractReader() |
Modifier and Type | Method and Description |
---|---|
GrizzlyFuture<ReadResult<Buffer,L>> |
read(Connection<L> connection)
Method reads data.
|
GrizzlyFuture<ReadResult<Buffer,L>> |
read(Connection<L> connection,
Buffer buffer)
Method reads data to the buffer.
|
void |
read(Connection<L> connection,
Buffer buffer,
CompletionHandler<ReadResult<Buffer,L>> completionHandler)
Method reads data to the buffer.
|
public final GrizzlyFuture<ReadResult<Buffer,L>> read(Connection<L> connection)
read
in interface Reader<L>
connection
- the Connection
to read fromFuture
, using which it's possible to check the resultpublic final GrizzlyFuture<ReadResult<Buffer,L>> read(Connection<L> connection, Buffer buffer)
read
in interface Reader<L>
connection
- the Connection
to read frombuffer
- the buffer, where data will be readFuture
, using which it's possible to check the resultpublic final void read(Connection<L> connection, Buffer buffer, CompletionHandler<ReadResult<Buffer,L>> completionHandler)
read
in interface Reader<L>
connection
- the Connection
to read frombuffer
- the buffer, where data will be readcompletionHandler
- CompletionHandler
,
which will get notified, when read will be completedCopyright © 2015 Oracle Corporation. All rights reserved.