public class MessageProducer<T> extends Object implements WriteStream<T>
NOTE: This class has been automatically generated from the
original non RX-ified interface using Vert.x codegen.| Modifier and Type | Field and Description |
|---|---|
static io.vertx.lang.rx.TypeArg<MessageProducer> |
__TYPE_ARG |
io.vertx.lang.rx.TypeArg<T> |
__typeArg_0 |
static int |
DEFAULT_WRITE_QUEUE_MAX_SIZE |
| Constructor and Description |
|---|
MessageProducer(MessageProducer delegate) |
MessageProducer(MessageProducer delegate,
io.vertx.lang.rx.TypeArg<T> typeArg_0) |
| Modifier and Type | Method and Description |
|---|---|
String |
address() |
void |
close()
Same as
close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>) but with an handler called when the operation completes |
void |
close(Handler<AsyncResult<Void>> handler)
Same as
close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>) but with an handler called when the operation completes |
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.
|
void |
end()
Closes the producer, calls
close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>) |
void |
end(Handler<AsyncResult<Void>> handler)
Closes the producer, calls
close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>) |
void |
end(T data)
Same as but with an
handler called when the operation completes |
void |
end(T data,
Handler<AsyncResult<Void>> handler)
Same as but with an
handler called when the operation completes |
boolean |
equals(Object o) |
MessageProducer<T> |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the write stream.
|
MessageProducer |
getDelegate() |
int |
hashCode() |
static <T> MessageProducer<T> |
newInstance(MessageProducer arg) |
static <T> MessageProducer<T> |
newInstance(MessageProducer arg,
io.vertx.lang.rx.TypeArg<T> __typeArg_T) |
Single<Void> |
rxClose()
Same as
close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>) but with an handler called when the operation completes |
Single<Void> |
rxEnd()
Closes the producer, calls
close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>) |
Single<Void> |
rxEnd(T data)
Same as but with an
handler called when the operation completes |
Single<Void> |
rxWrite(T data)
Same as but with an
handler called when the operation completes |
MessageProducer<T> |
setWriteQueueMaxSize(int maxSize)
Set the maximum size of the write queue to
maxSize. |
String |
toString() |
io.vertx.rx.java.WriteStreamSubscriber<T> |
toSubscriber() |
void |
write(T data)
Same as but with an
handler called when the operation completes |
void |
write(T data,
Handler<AsyncResult<Void>> handler)
Same as but with an
handler called when the operation completes |
boolean |
writeQueueFull()
This will return
true if there are more bytes in the write queue than the value set using setWriteQueueMaxSize(int) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitnewInstance, newInstancenewInstancepublic static final io.vertx.lang.rx.TypeArg<MessageProducer> __TYPE_ARG
public final io.vertx.lang.rx.TypeArg<T> __typeArg_0
public static final int DEFAULT_WRITE_QUEUE_MAX_SIZE
public MessageProducer(MessageProducer delegate)
public MessageProducer(MessageProducer delegate, io.vertx.lang.rx.TypeArg<T> typeArg_0)
public MessageProducer getDelegate()
getDelegate in interface StreamBasegetDelegate in interface WriteStream<T>public io.vertx.rx.java.WriteStreamSubscriber<T> toSubscriber()
public void write(T data, Handler<AsyncResult<Void>> handler)
handler called when the operation completeswrite in interface WriteStream<T>data - handler - public void write(T data)
handler called when the operation completeswrite in interface WriteStream<T>data - public Single<Void> rxWrite(T data)
handler called when the operation completesrxWrite in interface WriteStream<T>data - public void end(T data, Handler<AsyncResult<Void>> handler)
handler called when the operation completesend in interface WriteStream<T>data - handler - public void end(T data)
handler called when the operation completesend in interface WriteStream<T>data - public Single<Void> rxEnd(T data)
handler called when the operation completesrxEnd in interface WriteStream<T>data - public boolean writeQueueFull()
true if there are more bytes in the write queue than the value set using setWriteQueueMaxSize(int)writeQueueFull in interface WriteStream<T>public MessageProducer<T> exceptionHandler(Handler<Throwable> handler)
WriteStreamexceptionHandler in interface StreamBaseexceptionHandler in interface WriteStream<T>handler - the exception handlerpublic MessageProducer<T> setWriteQueueMaxSize(int maxSize)
WriteStreammaxSize. You will still be able to write to the stream even
if there is more than maxSize items in the write queue. This is used as an indicator by classes such as
Pump to provide flow control.
The value is defined by the implementation of the stream, e.g in bytes for a
NetSocket, the number of Message for a
MessageProducer, etc...setWriteQueueMaxSize in interface WriteStream<T>maxSize - the max size of the write streampublic MessageProducer<T> drainHandler(Handler<Void> handler)
WriteStreamPump for an example of this being used.
The stream implementation defines when the drain handler, for example it could be when the queue size has been
reduced to maxSize / 2.drainHandler in interface WriteStream<T>handler - the handlerpublic MessageProducer<T> deliveryOptions(DeliveryOptions options)
options - the new optionspublic String address()
public void end(Handler<AsyncResult<Void>> handler)
close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)end in interface WriteStream<T>handler - public void end()
close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)end in interface WriteStream<T>public Single<Void> rxEnd()
close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)rxEnd in interface WriteStream<T>public void close(Handler<AsyncResult<Void>> handler)
close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>) but with an handler called when the operation completeshandler - public void close()
close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>) but with an handler called when the operation completespublic Single<Void> rxClose()
close(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>) but with an handler called when the operation completespublic static <T> MessageProducer<T> newInstance(MessageProducer arg)
public static <T> MessageProducer<T> newInstance(MessageProducer arg, io.vertx.lang.rx.TypeArg<T> __typeArg_T)
Copyright © 2019 Eclipse. All rights reserved.