- All Superinterfaces:
OutputSink
- All Known Subinterfaces:
Connection<L>
- All Known Implementing Classes:
NIOConnection,TCPNIOConnection,TCPNIOServerConnection,UDPNIOConnection,UDPNIOServerConnection
Implementations of this interface are able to write data from a
Buffer.
Grizzly Connection extends Writeable.- Author:
- Alexey Stashok
-
Method Summary
Modifier and TypeMethodDescription<M> voidwrite(L dstAddress, M message, CompletionHandler<WriteResult<M, L>> completionHandler) Method writes the buffer to the specific address.<M> voidwrite(L dstAddress, M message, CompletionHandler<WriteResult<M, L>> completionHandler, PushBackHandler pushbackHandler) Deprecated.push back logic is deprecated<M> GrizzlyFuture<WriteResult<M,L>> write(M message) Method writes the buffer.<M> voidwrite(M message, CompletionHandler<WriteResult<M, L>> completionHandler) Method writes the buffer.<M> voidwrite(M message, CompletionHandler<WriteResult<M, L>> completionHandler, PushBackHandler pushbackHandler) Deprecated.push back logic is deprecatedMethods inherited from interface org.glassfish.grizzly.OutputSink
canWrite, canWrite, notifyCanWrite, notifyCanWrite
-
Method Details
-
write
Method writes the buffer.- Type Parameters:
M- type of data to be written- Parameters:
message- the buffer, from which the data will be written- Returns:
Future, using which it's possible to check the result
-
write
Method writes the buffer.- Type Parameters:
M- type of data to be written- Parameters:
message- the buffer, from which the data will be writtencompletionHandler-CompletionHandler, which will get notified, when write will be completed
-
write
@Deprecated <M> void write(M message, CompletionHandler<WriteResult<M, L>> completionHandler, PushBackHandler pushbackHandler) Deprecated.push back logic is deprecatedMethod writes the buffer.- Type Parameters:
M- type of data to be written- Parameters:
message- the buffer, 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 refused
-
write
Method writes the buffer to the specific address.- Type Parameters:
M- type of data to be written- Parameters:
dstAddress- the destination address the buffer will be sent tomessage- the buffer, from which the data will be writtencompletionHandler-CompletionHandler, which will get notified, when write will be completed
-
write
@Deprecated <M> void write(L dstAddress, M message, CompletionHandler<WriteResult<M, L>> completionHandler, PushBackHandler pushbackHandler) Deprecated.push back logic is deprecatedMethod writes the buffer to the specific address.- Type Parameters:
M- type of data to be written- Parameters:
dstAddress- the destination address the buffer will be sent tomessage- the buffer, 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 refused
-