io.vertx.reactivex.pgclient.pubsub

## Class PgChannel

- java.lang.Object
- - io.vertx.reactivex.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 the `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.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<PgChannel>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PgChannel(Object delegate)`
    `PgChannel(PgChannel delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    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()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface io.vertx.reactivex.core.streams.ReadStream

      `newInstance, newInstance`

    - ### Methods inherited from interface io.vertx.reactivex.core.streams.StreamBase

      `newInstance`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<PgChannel> __TYPE_ARG

  - ### Constructor Detail

    - #### PgChannel

          public PgChannel(PgChannel delegate)

    - #### PgChannel

          public PgChannel(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public PgChannel getDelegate()

      Specified by:
        `getDelegate` in interface `ReadStream<String>`
      Specified by:
        `getDelegate` in interface `StreamBase`

    - #### toObservable

          public Observable<String> toObservable()

      Specified by:
        `toObservable` in interface `ReadStream<String>`

    - #### toFlowable

          public Flowable<String> toFlowable()

      Specified by:
        `toFlowable` in interface `ReadStream<String>`

    - #### fetch

          public ReadStream<String> fetch(long amount)

      Fetch the specified `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.
      Specified by:
        `fetch` in interface `ReadStream<String>`
      Parameters:
        `amount` -
      Returns:
        a reference to this, so the API can be used fluently

    - #### pipe

          public Pipe<String> pipe()

      Pause this stream and return a to transfer the elements of this stream to a destination .

      The stream will be resumed when the pipe will be wired to a `WriteStream`.
      Specified by:
        `pipe` in interface `ReadStream<String>`
      Returns:
        a pipe

    - #### pipeTo

          public void pipeTo(WriteStream<String> dst,
                             Handler<AsyncResult<Void>> handler)

      Pipe this `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.

      Specified by:
        `pipeTo` in interface `ReadStream<String>`
      Parameters:
        `dst` - the destination write stream
        `handler` -

    - #### pipeTo

          public void pipeTo(WriteStream<String> dst)

      Pipe this `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.

      Specified by:
        `pipeTo` in interface `ReadStream<String>`
      Parameters:
        `dst` - the destination write stream

    - #### rxPipeTo

          public Completable rxPipeTo(WriteStream<String> dst)

      Pipe this `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.

      Specified by:
        `rxPipeTo` in interface `ReadStream<String>`
      Parameters:
        `dst` - the destination write stream
      Returns:

    - #### subscribeHandler

          public PgChannel subscribeHandler(Handler<Void> handler)

      Set an handler called when the the channel get subscribed.
      Parameters:
        `handler` - the handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### handler

          public PgChannel handler(Handler<String> handler)

      Set or unset an handler to be called when a the channel is notified by Postgres.

      - when the handler is set, the subscriber sends a `LISTEN` command if needed
      - when the handler is unset, the subscriber sends a `UNLISTEN` command if needed
      Specified by:
        `handler` in interface `ReadStream<String>`
      Parameters:
        `handler` - the handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### pause

          public PgChannel pause()

      Pause the channel, all notifications are discarded.
      Specified by:
        `pause` in interface `ReadStream<String>`
      Returns:
        a reference to this, so the API can be used fluently

    - #### resume

          public PgChannel resume()

      Resume the channel.
      Specified by:
        `resume` in interface `ReadStream<String>`
      Returns:
        a reference to this, so the API can be used fluently

    - #### endHandler

          public PgChannel endHandler(Handler<Void> endHandler)

      Set an handler to be called when no more notifications will be received.
      Specified by:
        `endHandler` in interface `ReadStream<String>`
      Parameters:
        `endHandler` - the handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### exceptionHandler

          public PgChannel exceptionHandler(Handler<Throwable> handler)

      Description copied from interface: `ReadStream`
      Set an exception handler on the read stream.
      Specified by:
        `exceptionHandler` in interface `ReadStream<String>`
      Specified by:
        `exceptionHandler` in interface `StreamBase`
      Parameters:
        `handler` - the exception handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### newInstance

          public static PgChannel newInstance(PgChannel arg)

Copyright © 2023 Eclipse. All rights reserved.