public abstract class TemporarySelectorWriter extends AbstractWriter<SocketAddress>
| Modifier and Type | Field and Description |
|---|---|
protected TemporarySelectorsEnabledTransport |
transport |
| Constructor and Description |
|---|
TemporarySelectorWriter(TemporarySelectorsEnabledTransport transport) |
| Modifier and Type | Method and Description |
|---|---|
TemporarySelectorsEnabledTransport |
getTransport() |
void |
write(Connection connection,
SocketAddress dstAddress,
WritableMessage message,
CompletionHandler<WriteResult<WritableMessage,SocketAddress>> completionHandler,
PushBackHandler pushBackHandler)
Method writes the
WritableMessage to the specific address. |
void |
write(Connection connection,
SocketAddress dstAddress,
WritableMessage message,
CompletionHandler<WriteResult<WritableMessage,SocketAddress>> completionHandler,
PushBackHandler pushBackHandler,
long timeout,
TimeUnit timeunit)
Method writes the
WritableMessage to the specific address. |
protected long |
write0(NIOConnection connection,
SocketAddress dstAddress,
WritableMessage message,
WriteResult<WritableMessage,SocketAddress> currentResult,
long timeout,
TimeUnit timeunit)
Flush the buffer by looping until the
Buffer is empty |
protected abstract long |
writeNow0(NIOConnection connection,
SocketAddress dstAddress,
WritableMessage message,
WriteResult<WritableMessage,SocketAddress> currentResult) |
write, write, write, writeprotected final TemporarySelectorsEnabledTransport transport
public TemporarySelectorWriter(TemporarySelectorsEnabledTransport transport)
public void write(Connection connection, SocketAddress dstAddress, WritableMessage message, CompletionHandler<WriteResult<WritableMessage,SocketAddress>> completionHandler, PushBackHandler pushBackHandler)
WritableMessage to the specific address.connection - the Connection to write todstAddress - the destination address the WritableMessage will be
sent tomessage - the WritableMessage, from which the data will be writtencompletionHandler - CompletionHandler,
which will get notified, when write will be completedpushBackHandler - PushBackHandler, which will be notified
if message was accepted by transport write queue or refusedpublic void write(Connection connection, SocketAddress dstAddress, WritableMessage message, CompletionHandler<WriteResult<WritableMessage,SocketAddress>> completionHandler, PushBackHandler pushBackHandler, long timeout, TimeUnit timeunit)
WritableMessage to the specific address.connection - the Connection to write todstAddress - the destination address the message will be
sent tomessage - the WritableMessage, from which the data will be writtencompletionHandler - CompletionHandler,
which will get notified, when write will be completedprotected long write0(NIOConnection connection, SocketAddress dstAddress, WritableMessage message, WriteResult<WritableMessage,SocketAddress> currentResult, long timeout, TimeUnit timeunit) throws IOException
Buffer is emptyconnection - the Connection.dstAddress - the destination address.message - currentResult - the result of the write operationtimeout - operation timeout value valuetimeunit - the timeout unitIOExceptionpublic TemporarySelectorsEnabledTransport getTransport()
protected abstract long writeNow0(NIOConnection connection, SocketAddress dstAddress, WritableMessage message, WriteResult<WritableMessage,SocketAddress> currentResult) throws IOException
IOExceptionCopyright © 2013 Oracle Corporation. All Rights Reserved.