com.sun.grizzly.http
Class SocketChannelOutputBuffer.AsyncWriteCallbackHandlerImpl

java.lang.Object
  extended by com.sun.grizzly.http.SocketChannelOutputBuffer.AsyncWriteCallbackHandlerImpl
All Implemented Interfaces:
AsyncWriteCallbackHandler
Direct Known Subclasses:
SSLOutputBuffer.AsyncWriteCallbackHandlerImpl
Enclosing class:
SocketChannelOutputBuffer

protected static class SocketChannelOutputBuffer.AsyncWriteCallbackHandlerImpl
extends Object
implements AsyncWriteCallbackHandler

AsyncWriteCallbackHandler implementation, which is responsible for returning cloned ByteBuffers to the pool


Constructor Summary
protected SocketChannelOutputBuffer.AsyncWriteCallbackHandlerImpl()
           
 
Method Summary
 void onException(Exception exception, SelectionKey key, ByteBuffer buffer, Queue<AsyncQueueWriteUnit> remainingQueue)
           
 void onWriteCompleted(SelectionKey key, AsyncQueueWriteUnit writtenRecord)
           
protected  boolean releaseAsyncWriteUnit(AsyncQueueWriteUnit unit)
           
protected  boolean returnBuffer(ByteBuffer buffer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocketChannelOutputBuffer.AsyncWriteCallbackHandlerImpl

protected SocketChannelOutputBuffer.AsyncWriteCallbackHandlerImpl()
Method Detail

onWriteCompleted

public void onWriteCompleted(SelectionKey key,
                             AsyncQueueWriteUnit writtenRecord)
Specified by:
onWriteCompleted in interface AsyncWriteCallbackHandler

onException

public void onException(Exception exception,
                        SelectionKey key,
                        ByteBuffer buffer,
                        Queue<AsyncQueueWriteUnit> remainingQueue)
Specified by:
onException in interface AsyncWriteCallbackHandler

releaseAsyncWriteUnit

protected boolean releaseAsyncWriteUnit(AsyncQueueWriteUnit unit)

returnBuffer

protected boolean returnBuffer(ByteBuffer buffer)


Copyright © 2009 SUN Microsystems. All Rights Reserved.