public class PgChannel extends Object implements ReadStream<String>
LISTEN/UNLISTEN commands.
When paused the channel discards the messages.
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<PgChannel> |
__TYPE_ARG |
| Constructor and Description |
|---|
PgChannel(Object delegate) |
PgChannel(PgChannel delegate) |
| Modifier and Type | Method and Description |
|---|---|
PgChannel |
endHandler(Handler<Void> endHandler)
Set an handler to be called when no more notifications will be received.
|
boolean |
equals(Object o) |
PgChannel |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
ReadStream<String> |
fetch(long amount)
Fetch the specified
amount of elements. |
PgChannel |
getDelegate() |
PgChannel |
handler(Handler<String> handler)
Set or unset an handler to be called when a the channel is notified by Postgres.
|
int |
hashCode() |
static PgChannel |
newInstance(PgChannel arg) |
PgChannel |
pause()
Pause the channel, all notifications are discarded.
|
Pipe<String> |
pipe()
Pause this stream and return a to transfer the elements of this stream to a destination .
|
void |
pipeTo(WriteStream<String> dst)
Pipe this
ReadStream to the WriteStream. |
void |
pipeTo(WriteStream<String> dst,
Handler<AsyncResult<Void>> handler)
Pipe this
ReadStream to the WriteStream. |
PgChannel |
resume()
Resume the channel.
|
Completable |
rxPipeTo(WriteStream<String> dst)
Pipe this
ReadStream to the WriteStream. |
PgChannel |
subscribeHandler(Handler<Void> handler)
Set an handler called when the the channel get subscribed.
|
Flowable<String> |
toFlowable() |
Observable<String> |
toObservable() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitnewInstance, newInstancenewInstancepublic static final io.vertx.lang.rx.TypeArg<PgChannel> __TYPE_ARG
public PgChannel(PgChannel delegate)
public PgChannel(Object delegate)
public PgChannel getDelegate()
getDelegate in interface ReadStream<String>getDelegate in interface StreamBasepublic Observable<String> toObservable()
toObservable in interface ReadStream<String>public Flowable<String> toFlowable()
toFlowable in interface ReadStream<String>public ReadStream<String> fetch(long amount)
amount of elements. If the ReadStream has been paused, reading will
recommence with the specified amount of items, otherwise the specified amount will
be added to the current stream demand.fetch in interface ReadStream<String>amount - public Pipe<String> pipe()
WriteStream.pipe in interface ReadStream<String>public void pipeTo(WriteStream<String> dst, Handler<AsyncResult<Void>> handler)
ReadStream to the WriteStream.
Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the handler will be
called with the result.
pipeTo in interface ReadStream<String>dst - the destination write streamhandler - public void pipeTo(WriteStream<String> dst)
ReadStream to the WriteStream.
Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the handler will be
called with the result.
pipeTo in interface ReadStream<String>dst - the destination write streampublic Completable rxPipeTo(WriteStream<String> dst)
ReadStream to the WriteStream.
Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the handler will be
called with the result.
rxPipeTo in interface ReadStream<String>dst - the destination write streampublic PgChannel subscribeHandler(Handler<Void> handler)
handler - the handlerpublic PgChannel handler(Handler<String> handler)
LISTEN command if neededUNLISTEN command if neededhandler in interface ReadStream<String>handler - the handlerpublic PgChannel pause()
pause in interface ReadStream<String>public PgChannel resume()
resume in interface ReadStream<String>public PgChannel endHandler(Handler<Void> endHandler)
endHandler in interface ReadStream<String>endHandler - the handlerpublic PgChannel exceptionHandler(Handler<Throwable> handler)
ReadStreamexceptionHandler in interface ReadStream<String>exceptionHandler in interface StreamBasehandler - the exception handlerCopyright © 2022 Eclipse. All rights reserved.