org.glassfish.grizzly
Class AbstractWriter<L>

java.lang.Object
  extended by org.glassfish.grizzly.AbstractWriter<L>
All Implemented Interfaces:
Writer<L>
Direct Known Subclasses:
AbstractNIOAsyncQueueWriter, TemporarySelectorWriter

public abstract class AbstractWriter<L>
extends java.lang.Object
implements Writer<L>

Abstract class, which provides transitive dependencies for overloaded Writer methods.

Author:
Alexey Stashok

Constructor Summary
AbstractWriter()
           
 
Method Summary
 GrizzlyFuture<WriteResult<Buffer,L>> write(Connection connection, Buffer buffer)
          Method writes the buffer.
 GrizzlyFuture<WriteResult<Buffer,L>> write(Connection connection, Buffer buffer, CompletionHandler<WriteResult<Buffer,L>> completionHandler)
          Method writes the buffer.
 GrizzlyFuture<WriteResult<Buffer,L>> write(Connection connection, L dstAddress, Buffer buffer)
          Method writes the buffer to the specific address.
 GrizzlyFuture<WriteResult<Buffer,L>> write(Connection connection, L dstAddress, Buffer buffer, CompletionHandler<WriteResult<Buffer,L>> completionHandler)
          Method writes the buffer to the specific address.
 
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
write
 

Constructor Detail

AbstractWriter

public AbstractWriter()
Method Detail

write

public final GrizzlyFuture<WriteResult<Buffer,L>> write(Connection connection,
                                                        Buffer buffer)
                                                 throws java.io.IOException
Method writes the buffer.

Specified by:
write in interface Writer<L>
Parameters:
connection - the Connection to write to
buffer - the buffer, from which the data will be written
Returns:
Future, using which it's possible to check the result
Throws:
java.io.IOException

write

public final GrizzlyFuture<WriteResult<Buffer,L>> write(Connection connection,
                                                        Buffer buffer,
                                                        CompletionHandler<WriteResult<Buffer,L>> completionHandler)
                                                 throws java.io.IOException
Method writes the buffer.

Specified by:
write in interface Writer<L>
Parameters:
connection - the Connection to write to
buffer - the buffer, from which the data will be written
completionHandler - CompletionHandler, which will get notified, when write will be completed
Returns:
Future, using which it's possible to check the result
Throws:
java.io.IOException

write

public final GrizzlyFuture<WriteResult<Buffer,L>> write(Connection connection,
                                                        L dstAddress,
                                                        Buffer buffer)
                                                 throws java.io.IOException
Method writes the buffer to the specific address.

Specified by:
write in interface Writer<L>
Parameters:
connection - the Connection to write to
dstAddress - the destination address the buffer will be sent to
buffer - the buffer, from which the data will be written
Returns:
Future, using which it's possible to check the result
Throws:
java.io.IOException

write

public final GrizzlyFuture<WriteResult<Buffer,L>> write(Connection connection,
                                                        L dstAddress,
                                                        Buffer buffer,
                                                        CompletionHandler<WriteResult<Buffer,L>> completionHandler)
                                                 throws java.io.IOException
Method writes the buffer to the specific address.

Specified by:
write in interface Writer<L>
Parameters:
connection - the Connection to write to
dstAddress - the destination address the buffer will be sent to
buffer - the buffer, from which the data will be written
completionHandler - CompletionHandler, which will get notified, when write will be completed
Returns:
Future, using which it's possible to check the result
Throws:
java.io.IOException


Copyright © 2011 Oracle Corpration. All Rights Reserved.