Any class that implements this interface can be used by a Pipe to pipe data from a ReadStream
to it.
| Modifier and Type | Method and Description |
|---|---|
| public WriteStream | Returns: a reference to this, so the API can be used fluentlythe handler handler)Set a drain handler on the stream. |
| public default Future | |
| public void | end(Handler<AsyncResult<Void>> handler)
Same as |
| public default Future | |
| public default void | end(T data, Handler<AsyncResult<Void>> handler)
Same as |
| public WriteStream | Returns: a reference to this, so the API can be used fluentlythe exception handler handler)Set an exception handler on the write stream. |
| public WriteStream | Returns: a reference to this, so the API can be used fluentlythe max size of the write stream maxSize)Set the maximum size of the write queue to |
| public Future | Returns: a future completed with the write resultthe data to write data)Write some data to the stream. |
| public void | write(T data, Handler<AsyncResult<Void>> handler)
Same as |
| public boolean | Returns: true if write queue is fullThis will return |
| drainHandler | back to summary |
|---|---|
| public WriteStream Set a drain handler on the stream. If the write queue is full, then the handler will be called when the write
queue is ready to accept buffers again. See The stream implementation defines when the drain handler, for example it could be when the queue size has been
reduced to
| |
| end | back to summary |
|---|---|
| public default Future Ends the stream. Once the stream has ended, it cannot be used any more. | |
| end | back to summary |
|---|---|
| public void end(Handler<AsyncResult<Void>> handler) Same as | |
| end | back to summary |
|---|---|
| public default Future Same as Implementation Specification The default default implementation calls sequentially API Note Implementations might want to perform a single operation | |
| end | back to summary |
|---|---|
| public default void end(T data, Handler<AsyncResult<Void>> handler) Same as | |
| exceptionHandler | back to summary |
|---|---|
| public WriteStream Set an exception handler on the write stream.
| |
| setWriteQueueMaxSize | back to summary |
|---|---|
| public WriteStream Set the maximum size of the write queue to
The value is defined by the implementation of the stream, e.g in bytes for a
| |
| write | back to summary |
|---|---|
| public Future Write some data to the stream. The data is usually put on an internal write queue, and the write actually happens
asynchronously. To avoid running out of memory by putting too much on the write queue,
check the When the | |
| write | back to summary |
|---|---|
| public void write(T data, Handler<AsyncResult<Void>> handler) Same as | |
| writeQueueFull | back to summary |
|---|---|
| public boolean writeQueueFull() This will return
| |