org.glassfish.grizzly.nio.transport
Class TCPNIOAsyncQueueWriter

java.lang.Object
  extended by org.glassfish.grizzly.AbstractWriter<java.net.SocketAddress>
      extended by org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter
          extended by org.glassfish.grizzly.nio.transport.TCPNIOAsyncQueueWriter
All Implemented Interfaces:
AsyncQueue, AsyncQueueWriter<java.net.SocketAddress>, Writer<java.net.SocketAddress>

public final class TCPNIOAsyncQueueWriter
extends AbstractNIOAsyncQueueWriter

The TCP transport AsyncQueueWriter implementation, based on the Java NIO

Author:
Alexey Stashok

Field Summary
 
Fields inherited from class org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter
maxPendingBytes, maxWriteReentrants, transport
 
Constructor Summary
TCPNIOAsyncQueueWriter(NIOTransport transport)
           
 
Method Summary
protected  AsyncWriteQueueRecord createRecord(Connection connection, Buffer message, java.util.concurrent.Future<WriteResult<Buffer,java.net.SocketAddress>> future, WriteResult<Buffer,java.net.SocketAddress> currentResult, CompletionHandler<WriteResult<Buffer,java.net.SocketAddress>> completionHandler, java.net.SocketAddress dstAddress, boolean isEmptyRecord)
           
protected  void onReadyToWrite(Connection connection)
           
protected  int write0(NIOConnection connection, AsyncWriteQueueRecord queueRecord)
           
 
Methods inherited from class org.glassfish.grizzly.nio.AbstractNIOAsyncQueueWriter
canWrite, close, failWriteRecord, getMaxPendingBytesPerConnection, getMaxWriteReentrants, isReady, onClose, onWriteComplete, onWriteFailure, onWriteIncomplete, processAsync, setMaxPendingBytesPerConnection, setMaxWriteReentrants, write, write
 
Methods inherited from class org.glassfish.grizzly.AbstractWriter
write, write, write, write
 
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.Writer
write, write, write, write
 

Constructor Detail

TCPNIOAsyncQueueWriter

public TCPNIOAsyncQueueWriter(NIOTransport transport)
Method Detail

createRecord

protected AsyncWriteQueueRecord createRecord(Connection connection,
                                             Buffer message,
                                             java.util.concurrent.Future<WriteResult<Buffer,java.net.SocketAddress>> future,
                                             WriteResult<Buffer,java.net.SocketAddress> currentResult,
                                             CompletionHandler<WriteResult<Buffer,java.net.SocketAddress>> completionHandler,
                                             java.net.SocketAddress dstAddress,
                                             boolean isEmptyRecord)
Overrides:
createRecord in class AbstractNIOAsyncQueueWriter

write0

protected int write0(NIOConnection connection,
                     AsyncWriteQueueRecord queueRecord)
              throws java.io.IOException
Specified by:
write0 in class AbstractNIOAsyncQueueWriter
Throws:
java.io.IOException

onReadyToWrite

protected final void onReadyToWrite(Connection connection)
                             throws java.io.IOException
Specified by:
onReadyToWrite in class AbstractNIOAsyncQueueWriter
Throws:
java.io.IOException


Copyright © 2011 Oracle Corpration. All Rights Reserved.