Package org.glassfish.grizzly
Class AbstractReader<L>
- java.lang.Object
-
- org.glassfish.grizzly.AbstractReader<L>
-
- All Implemented Interfaces:
Reader<L>
- Direct Known Subclasses:
AbstractNIOAsyncQueueReader,TemporarySelectorReader
public abstract class AbstractReader<L> extends Object implements Reader<L>
Abstract class, which provides transitive dependencies for overloadedReadermethods.- Author:
- Alexey Stashok
-
-
Field Summary
-
Fields inherited from interface org.glassfish.grizzly.Reader
COMPLETE_EVENT, INCOMPLETE_EVENT, READ_EVENT
-
-
Constructor Summary
Constructors Constructor Description AbstractReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.voidread(Connection<L> connection, Buffer buffer, CompletionHandler<ReadResult<Buffer,L>> completionHandler)Method reads data to the buffer.
-
-
-
Method Detail
-
read
public final GrizzlyFuture<ReadResult<Buffer,L>> read(Connection<L> connection)
Method reads data.- Specified by:
readin interfaceReader<L>- Parameters:
connection- theConnectionto read from- Returns:
Future, using which it's possible to check the result
-
read
public final GrizzlyFuture<ReadResult<Buffer,L>> read(Connection<L> connection, Buffer buffer)
Method reads data to the buffer.- Specified by:
readin interfaceReader<L>- Parameters:
connection- theConnectionto read frombuffer- the buffer, where data will be read- Returns:
Future, using which it's possible to check the result
-
read
public final void read(Connection<L> connection, Buffer buffer, CompletionHandler<ReadResult<Buffer,L>> completionHandler)
Method reads data to the buffer.- Specified by:
readin interfaceReader<L>- Parameters:
connection- theConnectionto read frombuffer- the buffer, where data will be readcompletionHandler-CompletionHandler, which will get notified, when read will be completed
-
-