public class PacketWritestream extends Object implements WriteStream<Buffer>
WriteStream for sending packets to a SocketAddress.
The stream is called when the write fails.
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.| Constructor and Description |
|---|
PacketWritestream(PacketWritestream delegate) |
| Modifier and Type | Method and Description |
|---|---|
PacketWritestream |
drainHandler(Handler<Void> handler)
Set a drain handler on the stream.
|
PacketWritestream |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the write stream.
|
Object |
getDelegate() |
static PacketWritestream |
newInstance(PacketWritestream arg) |
PacketWritestream |
setWriteQueueMaxSize(int maxSize)
Set the maximum size of the write queue to
maxSize. |
PacketWritestream |
write(Buffer data)
Write some data to the stream.
|
boolean |
writeQueueFull()
This will return
true if there are more bytes in the write queue than the value set using setWriteQueueMaxSize(int) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewInstancenewInstancepublic PacketWritestream(PacketWritestream delegate)
public Object getDelegate()
getDelegate in interface StreamBasegetDelegate in interface WriteStream<Buffer>public boolean writeQueueFull()
true if there are more bytes in the write queue than the value set using setWriteQueueMaxSize(int)writeQueueFull in interface WriteStream<Buffer>public PacketWritestream exceptionHandler(Handler<Throwable> handler)
WriteStreamexceptionHandler in interface StreamBaseexceptionHandler in interface WriteStream<Buffer>handler - the exception handlerpublic PacketWritestream write(Buffer data)
WriteStreamWriteStream.writeQueueFull() method before writing. This is done automatically if using a Pump.write in interface WriteStream<Buffer>data - the data to writepublic PacketWritestream setWriteQueueMaxSize(int maxSize)
WriteStreammaxSize. You will still be able to write to the stream even
if there is more than maxSize bytes in the write queue. This is used as an indicator by classes such as
Pump to provide flow control.setWriteQueueMaxSize in interface WriteStream<Buffer>maxSize - the max size of the write streampublic PacketWritestream drainHandler(Handler<Void> handler)
WriteStreamPump for an example of this being used.drainHandler in interface WriteStream<Buffer>handler - the handlerpublic static PacketWritestream newInstance(PacketWritestream arg)
Copyright © 2015. All rights reserved.