@groovy.transform.CompileStatic class MessageProducer extends java.lang.Object
Represents a stream of message that can be written to.
| Constructor and description |
|---|
MessageProducer
(java.lang.Object delegate) |
| Type | Name and description |
|---|---|
java.lang.String |
address()
|
void |
close()Closes the producer, this method should be called when the message producer is not used anymore. |
MessageProducer<T> |
deliveryOptions(java.util.Map<java.lang.String, java.lang.Object> options = [:])Update the delivery options of this producer. |
MessageProducer<T> |
drainHandler(io.vertx.core.Handler<java.lang.Void> handler) |
void |
end(T t)Same as MessageProducer.end but writes some data to the stream before ending. |
void |
end()Closes the producer, calls MessageProducer.close |
MessageProducer<T> |
exceptionHandler(io.vertx.core.Handler<java.lang.Throwable> handler) |
java.lang.Object |
getDelegate() |
MessageProducer<T> |
send(T message)Synonym for MessageProducer.write. |
MessageProducer<T> |
send(T message, io.vertx.core.Handler<io.vertx.core.AsyncResult<Message<R>>> replyHandler) |
MessageProducer<T> |
setWriteQueueMaxSize(int maxSize) |
MessageProducer<T> |
write(T data) |
boolean |
writeQueueFull()This will return true if there are more bytes in the write queue than the value set using MessageProducer.setWriteQueueMaxSize |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Closes the producer, this method should be called when the message producer is not used anymore.
Update the delivery options of this producer.
options - the new options (see DeliveryOptions)Same as MessageProducer.end but writes some data to the stream before ending.
Closes the producer, calls MessageProducer.close
Synonym for MessageProducer.write.
message - the message to send This will return true if there are more bytes in the write queue than the value set using MessageProducer.setWriteQueueMaxSize