|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.grizzly.async.AbstractAsyncQueueReader
public abstract class AbstractAsyncQueueReader
| Field Summary | |
|---|---|
protected SelectorHandler |
selectorHandler
|
| Constructor Summary | |
|---|---|
AbstractAsyncQueueReader(SelectorHandler selectorHandler)
|
|
| Method Summary | |
|---|---|
void |
close()
Close AsyncQueueReader and release its resources |
protected abstract OperationResult |
doRead(java.nio.channels.ReadableByteChannel channel,
java.nio.ByteBuffer byteBuffer,
AsyncQueueDataProcessor readPostProcessor,
OperationResult dstResult)
|
AsyncQueue.AsyncQueueEntry |
getAsyncQueue(java.nio.channels.SelectionKey key)
Gets ready asynchronous queue elements to be read from the SelectableChannel, associated with the
given SelectionKey |
boolean |
isReady(java.nio.channels.SelectionKey key)
Checks whether AsyncQueueReader is registered
for the SelectableChannel, associated with the given
SelectionKey |
void |
onClose(java.nio.channels.SelectableChannel channel)
Callback method, which should be called by SelectorHandler to
notify, that given SelectableChannel is going to be closed, so
related data could be released from
AsyncQueueReader |
void |
onRead(java.nio.channels.SelectionKey key)
Callback method, which should be called by SelectorHandler to
notify, that SelectableChannel, associated with the given
SelectableChannel has ready data for reading. |
java.util.concurrent.Future<AsyncQueueReadUnit> |
read(java.nio.channels.SelectionKey key,
java.nio.ByteBuffer buffer,
AsyncReadCallbackHandler callbackHandler)
|
java.util.concurrent.Future<AsyncQueueReadUnit> |
read(java.nio.channels.SelectionKey key,
java.nio.ByteBuffer buffer,
AsyncReadCallbackHandler callbackHandler,
AsyncReadCondition condition)
|
java.util.concurrent.Future<AsyncQueueReadUnit> |
read(java.nio.channels.SelectionKey key,
java.nio.ByteBuffer buffer,
AsyncReadCallbackHandler callbackHandler,
AsyncReadCondition condition,
AsyncQueueDataProcessor readPostProcessor)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final SelectorHandler selectorHandler
| Constructor Detail |
|---|
public AbstractAsyncQueueReader(SelectorHandler selectorHandler)
| Method Detail |
|---|
public java.util.concurrent.Future<AsyncQueueReadUnit> read(java.nio.channels.SelectionKey key,
java.nio.ByteBuffer buffer,
AsyncReadCallbackHandler callbackHandler)
throws java.io.IOException
read in interface AsyncQueueReaderjava.io.IOException
public java.util.concurrent.Future<AsyncQueueReadUnit> read(java.nio.channels.SelectionKey key,
java.nio.ByteBuffer buffer,
AsyncReadCallbackHandler callbackHandler,
AsyncReadCondition condition)
throws java.io.IOException
read in interface AsyncQueueReaderjava.io.IOException
public java.util.concurrent.Future<AsyncQueueReadUnit> read(java.nio.channels.SelectionKey key,
java.nio.ByteBuffer buffer,
AsyncReadCallbackHandler callbackHandler,
AsyncReadCondition condition,
AsyncQueueDataProcessor readPostProcessor)
throws java.io.IOException
read in interface AsyncQueueReaderjava.io.IOExceptionpublic boolean isReady(java.nio.channels.SelectionKey key)
AsyncQueueReaderAsyncQueueReader is registered
for the SelectableChannel, associated with the given
SelectionKey
isReady in interface AsyncQueueReaderkey - SelectionKey associated with SelectableChannel
public AsyncQueue.AsyncQueueEntry getAsyncQueue(java.nio.channels.SelectionKey key)
AsyncQueueReaderSelectableChannel, associated with the
given SelectionKey
getAsyncQueue in interface AsyncQueueReaderkey - SelectionKey associated with SelectableChannel
SelectableChannel, associated with the
given SelectionKey/
public void onRead(java.nio.channels.SelectionKey key)
throws java.io.IOException
AsyncQueueReaderSelectorHandler to
notify, that SelectableChannel, associated with the given
SelectableChannel has ready data for reading.
onRead in interface AsyncQueueReaderkey - SelectionKey associated with SelectableChannel
java.io.IOExceptionpublic void onClose(java.nio.channels.SelectableChannel channel)
AsyncQueueReaderSelectorHandler to
notify, that given SelectableChannel is going to be closed, so
related data could be released from
AsyncQueueReader
onClose in interface AsyncQueueReaderpublic void close()
AsyncQueueReaderAsyncQueueReader and release its resources
close in interface AsyncQueueReader
protected abstract OperationResult doRead(java.nio.channels.ReadableByteChannel channel,
java.nio.ByteBuffer byteBuffer,
AsyncQueueDataProcessor readPostProcessor,
OperationResult dstResult)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||