Package org.glassfish.grizzly
Class AbstractWriter<L>
- java.lang.Object
-
- org.glassfish.grizzly.AbstractWriter<L>
-
- All Implemented Interfaces:
Writer<L>
- Direct Known Subclasses:
AbstractNIOAsyncQueueWriter,TemporarySelectorWriter
public abstract class AbstractWriter<L> extends Object implements Writer<L>
Abstract class, which provides transitive dependencies for overloadedWritermethods.- Author:
- Alexey Stashok
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.grizzly.Writer
Writer.Reentrant
-
-
Constructor Summary
Constructors Constructor Description AbstractWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GrizzlyFuture<WriteResult<WritableMessage,L>>write(Connection<L> connection, L dstAddress, WritableMessage message)Method writes theWritableMessageto the specific address.voidwrite(Connection<L> connection, L dstAddress, WritableMessage message, CompletionHandler<WriteResult<WritableMessage,L>> completionHandler)Method writes theWritableMessageto the specific address.GrizzlyFuture<WriteResult<WritableMessage,L>>write(Connection<L> connection, WritableMessage message)Method writes theWritableMessage.voidwrite(Connection<L> connection, WritableMessage message, CompletionHandler<WriteResult<WritableMessage,L>> completionHandler)Method writes theWritableMessage.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.glassfish.grizzly.Writer
canWrite, notifyWritePossible, write, write
-
-
-
-
Method Detail
-
write
public final GrizzlyFuture<WriteResult<WritableMessage,L>> write(Connection<L> connection, WritableMessage message)
Method writes theWritableMessage.- Specified by:
writein interfaceWriter<L>- Parameters:
connection- theConnectionto write tomessage- theWritableMessage, from which the data will be written- Returns:
Future, using which it's possible to check the result
-
write
public final void write(Connection<L> connection, WritableMessage message, CompletionHandler<WriteResult<WritableMessage,L>> completionHandler)
Method writes theWritableMessage.- Specified by:
writein interfaceWriter<L>- Parameters:
connection- theConnectionto write tomessage- theWritableMessage, from which the data will be writtencompletionHandler-CompletionHandler, which will get notified, when write will be completed
-
write
public final GrizzlyFuture<WriteResult<WritableMessage,L>> write(Connection<L> connection, L dstAddress, WritableMessage message)
Method writes theWritableMessageto the specific address.- Specified by:
writein interfaceWriter<L>- Parameters:
connection- theConnectionto write todstAddress- the destination address theWritableMessagewill be sent tomessage- theWritableMessage, from which the data will be written- Returns:
Future, using which it's possible to check the result
-
write
public final void write(Connection<L> connection, L dstAddress, WritableMessage message, CompletionHandler<WriteResult<WritableMessage,L>> completionHandler)
Method writes theWritableMessageto the specific address.- Specified by:
writein interfaceWriter<L>- Parameters:
connection- theConnectionto write todstAddress- the destination address theWritableMessagewill be sent tomessage- theWritableMessage, from which the data will be writtencompletionHandler-CompletionHandler, which will get notified, when write will be completed
-
-