org.glassfish.grizzly.nio.transport
Class TCPNIOAsyncQueueReader

java.lang.Object
  extended by org.glassfish.grizzly.AbstractReader<SocketAddress>
      extended by org.glassfish.grizzly.nio.AbstractNIOAsyncQueueReader
          extended by org.glassfish.grizzly.nio.transport.TCPNIOAsyncQueueReader
All Implemented Interfaces:
AsyncQueue, AsyncQueueReader<SocketAddress>, Reader<SocketAddress>

public final class TCPNIOAsyncQueueReader
extends AbstractNIOAsyncQueueReader

The TCP transport AsyncQueueReader implementation, based on the Java NIO

Author:
Alexey Stashok

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.glassfish.grizzly.asyncqueue.AsyncQueue
AsyncQueue.AsyncResult
 
Field Summary
 
Fields inherited from class org.glassfish.grizzly.nio.AbstractNIOAsyncQueueReader
DEFAULT_BUFFER_SIZE, defaultBufferSize, transport
 
Fields inherited from interface org.glassfish.grizzly.Reader
COMPLETE_EVENT, INCOMPLETE_EVENT, READ_EVENT
 
Fields inherited from interface org.glassfish.grizzly.asyncqueue.AsyncQueue
EXPECTING_MORE_OPTION
 
Constructor Summary
TCPNIOAsyncQueueReader(NIOTransport transport)
           
 
Method Summary
protected  void addRecord(Connection connection, Buffer buffer, CompletionHandler completionHandler, Interceptor<ReadResult> interceptor)
           
protected  void onReadyToRead(Connection connection)
           
protected  int read0(Connection connection, Buffer buffer, ReadResult<Buffer,SocketAddress> currentResult)
           
 
Methods inherited from class org.glassfish.grizzly.nio.AbstractNIOAsyncQueueReader
close, doRead, isReady, onClose, onReadFailure, processAsync, read
 
Methods inherited from class org.glassfish.grizzly.AbstractReader
read, read, read
 
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, read, read
 

Constructor Detail

TCPNIOAsyncQueueReader

public TCPNIOAsyncQueueReader(NIOTransport transport)
Method Detail

read0

protected int read0(Connection connection,
                    Buffer buffer,
                    ReadResult<Buffer,SocketAddress> currentResult)
             throws IOException
Specified by:
read0 in class AbstractNIOAsyncQueueReader
Throws:
IOException

addRecord

protected void addRecord(Connection connection,
                         Buffer buffer,
                         CompletionHandler completionHandler,
                         Interceptor<ReadResult> interceptor)

onReadyToRead

protected final void onReadyToRead(Connection connection)
                            throws IOException
Specified by:
onReadyToRead in class AbstractNIOAsyncQueueReader
Throws:
IOException


Copyright © 2013 Oracle Corporation. All Rights Reserved.