Package org.glassfish.grizzly
Interface Writeable<L>
-
- All Superinterfaces:
OutputSink
- All Known Subinterfaces:
Connection<L>
- All Known Implementing Classes:
NIOConnection,TCPNIOConnection,TCPNIOServerConnection,UDPNIOConnection,UDPNIOServerConnection
public interface Writeable<L> extends OutputSink
Implementations of this interface are able to write data from aBuffer. GrizzlyConnectionextendsWriteable.- Author:
- Alexey Stashok
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description <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 deprecated-
Methods inherited from interface org.glassfish.grizzly.OutputSink
canWrite, canWrite, notifyCanWrite, notifyCanWrite
-
-
-
-
Method Detail
-
write
<M> GrizzlyFuture<WriteResult<M,L>> write(M message)
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
<M> void write(M message, CompletionHandler<WriteResult<M,L>> completionHandler)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
<M> void write(L dstAddress, M message, CompletionHandler<WriteResult<M,L>> completionHandler)
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
-
-