org.glassfish.grizzly
Class AbstractReader<L>

java.lang.Object
  extended by org.glassfish.grizzly.AbstractReader<L>
All Implemented Interfaces:
Reader<L>
Direct Known Subclasses:
AbstractNIOAsyncQueueReader, TemporarySelectorReader

public abstract class AbstractReader<L>
extends java.lang.Object
implements Reader<L>

Abstract class, which provides transitive dependencies for overloaded Reader methods.

Author:
Alexey Stashok

Field Summary
 
Fields inherited from interface org.glassfish.grizzly.Reader
COMPLETE_EVENT, INCOMPLETE_EVENT, READ_EVENT
 
Constructor Summary
AbstractReader()
           
 
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.
 void read(Connection connection, Buffer buffer, CompletionHandler<ReadResult<Buffer,L>> completionHandler)
          Method reads data to the buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.glassfish.grizzly.Reader
read
 

Constructor Detail

AbstractReader

public AbstractReader()
Method Detail

read

public final GrizzlyFuture<ReadResult<Buffer,L>> read(Connection connection)
Method reads data.

Specified by:
read in interface Reader<L>
Parameters:
connection - the Connection to read from
Returns:
Future, using which it's possible to check the result

read

public final GrizzlyFuture<ReadResult<Buffer,L>> read(Connection connection,
                                                      Buffer buffer)
Method reads data to the buffer.

Specified by:
read in interface Reader<L>
Parameters:
connection - the Connection to read from
buffer - the buffer, where data will be read
Returns:
Future, using which it's possible to check the result

read

public final void read(Connection connection,
                       Buffer buffer,
                       CompletionHandler<ReadResult<Buffer,L>> completionHandler)
Method reads data to the buffer.

Specified by:
read in interface Reader<L>
Parameters:
connection - the Connection to read from
buffer - the buffer, where data will be read
completionHandler - CompletionHandler, which will get notified, when read will be completed


Copyright © 2012 Oracle Corporation. All Rights Reserved.