Class PgChannel
- java.lang.Object
-
- io.vertx.mutiny.pgclient.pubsub.PgChannel
-
- All Implemented Interfaces:
ReadStream<String>
,StreamBase
public class PgChannel extends Object implements ReadStream<String>
A channel to Postgres that tracks the subscription to a given Postgres channel using theLISTEN/UNLISTEN
commands. When paused the channel discards the messages. NOTE: This class has been automatically generated from theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<PgChannel>
__TYPE_ARG
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PgChannel
endHandler(Runnable endHandler)
boolean
equals(Object o)
PgChannel
exceptionHandler(Consumer<Throwable> handler)
ReadStream<String>
fetch(long arg0)
io.vertx.pgclient.pubsub.PgChannel
getDelegate()
PgChannel
handler(Consumer<String> handler)
int
hashCode()
static PgChannel
newInstance(io.vertx.pgclient.pubsub.PgChannel arg)
PgChannel
pause()
Pipe<String>
pipe()
io.smallrye.mutiny.Uni<Void>
pipeTo(WriteStream<String> dst)
Pipe thisReadStream
to theWriteStream
.Void
pipeToAndAwait(WriteStream<String> dst)
Blocking variant ofio.vertx.mutiny.core.streams.ReadStream#pipeTo(io.vertx.mutiny.core.streams.WriteStream
.) void
pipeToAndForget(WriteStream<String> dst)
Variant ofio.vertx.mutiny.core.streams.ReadStream#pipeTo(io.vertx.mutiny.core.streams.WriteStream
that ignores the result of the operation.) PgChannel
resume()
PgChannel
subscribeHandler(Runnable handler)
Iterable<String>
toBlockingIterable()
Stream<String>
toBlockingStream()
io.smallrye.mutiny.Multi<String>
toMulti()
String
toString()
-
-
-
Constructor Detail
-
PgChannel
public PgChannel(io.vertx.pgclient.pubsub.PgChannel delegate)
-
PgChannel
public PgChannel(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.pgclient.pubsub.PgChannel getDelegate()
- Specified by:
getDelegate
in interfaceReadStream<String>
- Specified by:
getDelegate
in interfaceStreamBase
-
fetch
public ReadStream<String> fetch(long arg0)
- Specified by:
fetch
in interfaceReadStream<String>
- Returns:
- a reference to this, so the API can be used fluently
-
pipe
public Pipe<String> pipe()
- Specified by:
pipe
in interfaceReadStream<String>
- Returns:
- a pipe
-
pipeTo
public io.smallrye.mutiny.Uni<Void> pipeTo(WriteStream<String> dst)
Description copied from interface:ReadStream
Pipe thisReadStream
to theWriteStream
.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.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Specified by:
pipeTo
in interfaceReadStream<String>
- Parameters:
dst
- the destination write stream- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
pipeToAndAwait
public Void pipeToAndAwait(WriteStream<String> dst)
Description copied from interface:ReadStream
Blocking variant ofio.vertx.mutiny.core.streams.ReadStream#pipeTo(io.vertx.mutiny.core.streams.WriteStream
.) This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Specified by:
pipeToAndAwait
in interfaceReadStream<String>
- Parameters:
dst
- the destination write stream- Returns:
- the Void instance produced by the operation.
-
pipeToAndForget
public void pipeToAndForget(WriteStream<String> dst)
Description copied from interface:ReadStream
Variant ofio.vertx.mutiny.core.streams.ReadStream#pipeTo(io.vertx.mutiny.core.streams.WriteStream
that ignores the result of the operation.) This method subscribes on the result of
io.vertx.mutiny.core.streams.ReadStream#pipeTo(io.vertx.mutiny.core.streams.WriteStream
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from) io.vertx.mutiny.core.streams.ReadStream#pipeTo(io.vertx.mutiny.core.streams.WriteStream
but you don't need to compose it with other operations.) - Specified by:
pipeToAndForget
in interfaceReadStream<String>
- Parameters:
dst
- the destination write stream
-
subscribeHandler
public PgChannel subscribeHandler(Runnable handler)
- Parameters:
handler
- the handler- Returns:
-
handler
public PgChannel handler(Consumer<String> handler)
- Specified by:
handler
in interfaceReadStream<String>
- Parameters:
handler
- the handler- Returns:
-
pause
public PgChannel pause()
- Specified by:
pause
in interfaceReadStream<String>
- Returns:
- a reference to this, so the API can be used fluently
-
resume
public PgChannel resume()
- Specified by:
resume
in interfaceReadStream<String>
- Returns:
- a reference to this, so the API can be used fluently
-
endHandler
public PgChannel endHandler(Runnable endHandler)
- Specified by:
endHandler
in interfaceReadStream<String>
- Parameters:
endHandler
- the handler- Returns:
-
exceptionHandler
public PgChannel exceptionHandler(Consumer<Throwable> handler)
- Specified by:
exceptionHandler
in interfaceReadStream<String>
- Specified by:
exceptionHandler
in interfaceStreamBase
- Parameters:
handler
- the exception handler- Returns:
-
toMulti
public io.smallrye.mutiny.Multi<String> toMulti()
- Specified by:
toMulti
in interfaceReadStream<String>
-
newInstance
public static PgChannel newInstance(io.vertx.pgclient.pubsub.PgChannel arg)
-
-