|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AsyncQueueWritable
Object, which is able to send ByteBuffer
data asynchronously,
using queue.
Method Detail |
---|
Future<AsyncQueueWriteUnit> writeToAsyncQueue(ByteBuffer buffer) throws IOException
ByteBuffer
using async write queue.
First, if write queue is empty - it tries to write ByteBuffer
directly (without putting to the queue).
If associated write queue is not empty or after direct writing
ByteBuffer
still has ready data to be written -
ByteBuffer
will be added to AsyncQueue
.
If an exception occurs, during direct writing - it will be propagated
to the caller directly, otherwise it will be just logged by
Grizzly framework.
buffer
- ByteBuffer
IOException
Future<AsyncQueueWriteUnit> writeToAsyncQueue(ByteBuffer buffer, AsyncWriteCallbackHandler callbackHandler) throws IOException
ByteBuffer
using async write queue.
First, if write queue is empty - it tries to write ByteBuffer
directly (without putting to the queue).
If associated write queue is not empty or after direct writing
ByteBuffer
still has ready data to be written -
ByteBuffer
will be added to AsyncQueue
.
If an exception occurs, during direct writing - it will be propagated
to the caller directly, otherwise, if the ByteBuffer
is
added to a writing queue - exception notification will come via
AsyncWriteCallbackHandler.onIOException()
buffer
- ByteBuffer
callbackHandler
- AsyncWriteCallbackHandler
,
which will get notified, when
ByteBuffer
will be completely written
IOException
Future<AsyncQueueWriteUnit> writeToAsyncQueue(ByteBuffer buffer, AsyncWriteCallbackHandler callbackHandler, AsyncQueueDataProcessor writePreProcessor) throws IOException
ByteBuffer
using async write queue.
First, if write queue is empty - it tries to write ByteBuffer
directly (without putting to the queue).
If associated write queue is not empty or after direct writing
ByteBuffer
still has ready data to be written -
ByteBuffer
will be added to AsyncQueue
.
If an exception occurs, during direct writing - it will be propagated
to the caller directly, otherwise, if the ByteBuffer
is
added to a writing queue - exception notification will come via
AsyncWriteCallbackHandler.onIOException()
Before data will be written on SelectableChannel
, first it
will be passed for preprocessing to AsyncQueueDataProcessor
,
and then preprocessor result data
(AsyncQueueDataProcessor.getResultByteBuffer()
) will be
written on the SelectableChannel
.
buffer
- ByteBuffer
callbackHandler
- AsyncWriteCallbackHandler
,
which will get notified, when
ByteBuffer
will be completely writtenwritePreProcessor
- AsyncQueueDataProcessor
, which
will perform data processing, before it will be
written on SelectableChannel
IOException
Future<AsyncQueueWriteUnit> writeToAsyncQueue(ByteBuffer buffer, AsyncWriteCallbackHandler callbackHandler, AsyncQueueDataProcessor writePreProcessor, ByteBufferCloner cloner) throws IOException
ByteBuffer
using async write queue.
First, if write queue is empty - it tries to write ByteBuffer
directly (without putting to the queue).
If associated write queue is not empty or after direct writing
ByteBuffer
still has ready data to be written -
ByteBuffer
will be added to AsyncQueue
.
If an exception occurs, during direct writing - it will be propagated
to the caller directly, otherwise, if the ByteBuffer
is
added to a writing queue - exception notification will come via
AsyncWriteCallbackHandler.onIOException()
Before data will be written on SelectableChannel
, first it
will be passed for preprocessing to AsyncQueueDataProcessor
,
and then preprocessor result data
(AsyncQueueDataProcessor.getResultByteBuffer()
) will be
written on the SelectableChannel
.
buffer
- ByteBuffer
callbackHandler
- AsyncWriteCallbackHandler
,
which will get notified, when
ByteBuffer
will be completely writtenwritePreProcessor
- AsyncQueueDataProcessor
, which
will perform data processing, before it will be
written on SelectableChannel
isCloneByteBuffer
- if true - AsyncQueueWriter
will clone given
ByteBuffer
before puting it to the
AsyncQueue
IOException
Future<AsyncQueueWriteUnit> writeToAsyncQueue(SocketAddress dstAddress, ByteBuffer buffer) throws IOException
ByteBuffer
using async write queue.
First, if write queue is empty - it tries to send ByteBuffer
to the given SocketAddress
directly
(without putting to the queue).
If associated write queue is not empty or after direct sending
ByteBuffer
still has ready data to be written -
ByteBuffer
will be added to AsyncQueue
.
If an exception occurs, during direct writing - it will be propagated
to the caller directly, otherwise it will be just logged by
Grizzly framework.
dstAddress
- destination SocketAddress
data will
be sent tobuffer
- ByteBuffer
IOException
Future<AsyncQueueWriteUnit> writeToAsyncQueue(SocketAddress dstAddress, ByteBuffer buffer, AsyncWriteCallbackHandler callbackHandler) throws IOException
ByteBuffer
using async write queue.
First, if write queue is empty - it tries to send ByteBuffer
to the given SocketAddress
directly
(without putting to the queue).
If associated write queue is not empty or after direct sending
ByteBuffer
still has ready data to be written -
ByteBuffer
will be added to AsyncQueue
.
If an exception occurs, during direct writing - it will be propagated
to the caller directly, otherwise, if the ByteBuffer
is
added to a writing queue - exception notification will come via
AsyncWriteCallbackHandler.onIOException()
dstAddress
- destination SocketAddress
data will
be sent tobuffer
- ByteBuffer
callbackHandler
- AsyncWriteCallbackHandler
,
which will get notified, when
ByteBuffer
will be completely written
IOException
Future<AsyncQueueWriteUnit> writeToAsyncQueue(SocketAddress dstAddress, ByteBuffer buffer, AsyncWriteCallbackHandler callbackHandler, AsyncQueueDataProcessor writePreProcessor) throws IOException
ByteBuffer
using async write queue.
First, if write queue is empty - it tries to send ByteBuffer
to the given SocketAddress
directly
(without putting to the queue).
If associated write queue is not empty or after direct sending
ByteBuffer
still has ready data to be written -
ByteBuffer
will be added to AsyncQueue
.
If an exception occurs, during direct writing - it will be propagated
to the caller directly, otherwise, if the ByteBuffer
is
added to a writing queue - exception notification will come via
AsyncWriteCallbackHandler.onIOException()
Before data will be written on SelectableChannel
, first it
will be passed for preprocessing to AsyncQueueDataProcessor
,
and then preprocessor result data
(AsyncQueueDataProcessor.getResultByteBuffer()
) will be
written on the SelectableChannel
.
dstAddress
- destination SocketAddress
data will
be sent tobuffer
- ByteBuffer
callbackHandler
- AsyncWriteCallbackHandler
,
which will get notified, when
ByteBuffer
will be completely writtenwritePreProcessor
- AsyncQueueDataProcessor
, which
will perform data processing, before it will be
written on SelectableChannel
IOException
Future<AsyncQueueWriteUnit> writeToAsyncQueue(SocketAddress dstAddress, ByteBuffer buffer, AsyncWriteCallbackHandler callbackHandler, AsyncQueueDataProcessor writePreProcessor, ByteBufferCloner cloner) throws IOException
ByteBuffer
using async write queue.
First, if write queue is empty - it tries to send ByteBuffer
to the given SocketAddress
directly
(without putting to the queue).
If associated write queue is not empty or after direct sending
ByteBuffer
still has ready data to be written -
ByteBuffer
will be added to AsyncQueue
.
If an exception occurs, during direct writing - it will be propagated
to the caller directly, otherwise, if the ByteBuffer
is
added to a writing queue - exception notification will come via
AsyncWriteCallbackHandler.onIOException()
Before data will be written on SelectableChannel
, first it
will be passed for preprocessing to AsyncQueueDataProcessor
,
and then preprocessor result data
(AsyncQueueDataProcessor.getResultByteBuffer()
) will be
written on the SelectableChannel
.
dstAddress
- destination SocketAddress
data will
be sent tobuffer
- ByteBuffer
callbackHandler
- AsyncWriteCallbackHandler
,
which will get notified, when
ByteBuffer
will be completely writtenwritePreProcessor
- AsyncQueueDataProcessor
, which
will perform data processing, before it will be
written on SelectableChannel
isCloneByteBuffer
- if true - AsyncQueueWriter
will clone given
ByteBuffer
before puting it to the
AsyncQueue
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |