public interface MessageProducer<T> extends WriteStream<T>
| Modifier and Type | Method and Description |
|---|---|
String |
address() |
MessageProducer<T> |
deliveryOptions(DeliveryOptions options)
Update the delivery options of this producer.
|
MessageProducer<T> |
drainHandler(Handler<Void> handler)
Set a drain handler on the stream.
|
MessageProducer<T> |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the write stream.
|
MessageProducer<T> |
setWriteQueueMaxSize(int maxSize)
Set the maximum size of the write queue to
maxSize. |
MessageProducer<T> |
write(T data)
Write some data to the stream.
|
writeQueueFullMessageProducer<T> exceptionHandler(Handler<Throwable> handler)
WriteStreamexceptionHandler in interface StreamBaseexceptionHandler in interface WriteStream<T>handler - the exception handlerMessageProducer<T> write(T data)
WriteStreamWriteStream.writeQueueFull() method before writing. This is done automatically if using a Pump.write in interface WriteStream<T>data - the data to writeMessageProducer<T> 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<T>maxSize - the max size of the write streamMessageProducer<T> drainHandler(Handler<Void> handler)
WriteStreamPump for an example of this being used.drainHandler in interface WriteStream<T>handler - the handlerMessageProducer<T> deliveryOptions(DeliveryOptions options)
options - the new optionsString address()
Copyright © 2015. All rights reserved.