org.glassfish.grizzly
Interface Writable<L>

All Known Subinterfaces:
Connection<L>
All Known Implementing Classes:
NIOConnection, TCPNIOConnection, TCPNIOServerConnection, UDPNIOConnection, UDPNIOServerConnection

public interface Writable<L>

Implementations of this interface are able to write data from a Buffer. Grizzly Connection extends Writable.

Author:
Alexey Stashok

Method Summary
<M> void
write(L dstAddress, M message, CompletionHandler<WriteResult<M,L>> completionHandler, PushBackHandler pushbackHandler)
          Method writes the buffer to the specific address.
<M> GrizzlyFuture<WriteResult<M,L>>
write(M message)
          Method writes the buffer.
<M> void
write(M message, CompletionHandler<WriteResult<M,L>> completionHandler)
          Method writes the buffer.
<M> void
write(M message, CompletionHandler<WriteResult<M,L>> completionHandler, PushBackHandler pushbackHandler)
          Method writes the buffer.
 

Method Detail

write

<M> GrizzlyFuture<WriteResult<M,L>> write(M message)
Method writes the buffer.

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.

Parameters:
message - the buffer, from which the data will be written
completionHandler - CompletionHandler, which will get notified, when write will be completed

write

<M> void write(M message,
               CompletionHandler<WriteResult<M,L>> completionHandler,
               PushBackHandler pushbackHandler)
Method writes the buffer.

Parameters:
message - the buffer, from which the data will be written
completionHandler - CompletionHandler, which will get notified, when write will be completed
pushbackHandler - 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,
               PushBackHandler pushbackHandler)
Method writes the buffer to the specific address.

Parameters:
dstAddress - the destination address the buffer will be sent to
message - the buffer, from which the data will be written
completionHandler - CompletionHandler, which will get notified, when write will be completed
pushbackHandler - PushBackHandler, which will be notified if message was accepted by transport write queue or refused


Copyright © 2012 Oracle Corporation. All Rights Reserved.