public interface Writer<L>
Buffer
to Connection
.
There are two basic Writer implementations in Grizzly:
AsyncQueueWriter
,
TemporarySelectorWriter
.Modifier and Type | Method and Description |
---|---|
GrizzlyFuture<WriteResult<WritableMessage,L>> |
write(Connection connection,
L dstAddress,
WritableMessage message)
Method writes the
WritableMessage to the specific address. |
void |
write(Connection connection,
L dstAddress,
WritableMessage message,
CompletionHandler<WriteResult<WritableMessage,L>> completionHandler)
Method writes the
WritableMessage to the specific address. |
void |
write(Connection connection,
L dstAddress,
WritableMessage message,
CompletionHandler<WriteResult<WritableMessage,L>> completionHandler,
PushBackHandler pushBackHandler)
Deprecated.
push back logic is deprecated
|
GrizzlyFuture<WriteResult<WritableMessage,L>> |
write(Connection connection,
WritableMessage message)
Method writes the
WritableMessage . |
void |
write(Connection connection,
WritableMessage message,
CompletionHandler<WriteResult<WritableMessage,L>> completionHandler)
Method writes the
WritableMessage . |
GrizzlyFuture<WriteResult<WritableMessage,L>> write(Connection connection, WritableMessage message) throws IOException
WritableMessage
.connection
- the Connection
to write tomessage
- the WritableMessage
, from which the data will be writtenFuture
, using which it's possible to check the
resultIOException
void write(Connection connection, WritableMessage message, CompletionHandler<WriteResult<WritableMessage,L>> completionHandler)
WritableMessage
.connection
- the Connection
to write tomessage
- the WritableMessage
, from which the data will be writtencompletionHandler
- CompletionHandler
,
which will get notified, when write will be completedGrizzlyFuture<WriteResult<WritableMessage,L>> write(Connection connection, L dstAddress, WritableMessage message)
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 writtenFuture
, using which it's possible to check the
resultvoid write(Connection connection, L dstAddress, WritableMessage message, CompletionHandler<WriteResult<WritableMessage,L>> completionHandler)
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 completedvoid write(Connection connection, L dstAddress, WritableMessage message, CompletionHandler<WriteResult<WritableMessage,L>> 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 refusedCopyright © 2013 Oracle Corporation. All Rights Reserved.