io.vertx.rxjava.ext.stomp

## Class Destination

- java.lang.Object
- - io.vertx.rxjava.ext.stomp.Destination

-     public class Destination
      extends Object

  Represents a STOMP destination. Depending on the implementation, the message delivery is different. Queue are sending message to only one subscribers, while topics are broadcasting the message to all subscribers.

  Implementations must be thread-safe.

  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<Destination>` | `__TYPE_ARG`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `ack(StompServerConnection connection, Frame frame)` Handles a `ACK` frame.
    `static Destination` | `bridge(Vertx vertx, BridgeOptions options)`
    `String` | `destination()`
    `Destination` | `dispatch(StompServerConnection connection, Frame frame)` Dispatches the given frame.
    `boolean` | `equals(Object o)`
    `Destination` | `getDelegate()`
    `List<String>` | `getSubscriptions(StompServerConnection connection)` Gets all subscription ids for the given destination hold by the given client
    `int` | `hashCode()`
    `boolean` | `matches(String address)` Checks whether or not the given address matches with the current destination.
    `boolean` | `nack(StompServerConnection connection, Frame frame)` Handles a `NACK` frame.
    `static Destination` | `newInstance(Destination arg)`
    `int` | `numberOfSubscriptions()` Gets the number of subscriptions attached to the current `Destination`.
    `static Destination` | `queue(Vertx vertx, String destination)`
    `Destination` | `subscribe(StompServerConnection connection, Frame frame)` Handles a subscription request to the current `Destination`.
    `static Destination` | `topic(Vertx vertx, String destination)`
    `String` | `toString()`
    `boolean` | `unsubscribe(StompServerConnection connection, Frame frame)` Handles a un-subscription request to the current `Destination`.
    `Destination` | `unsubscribeConnection(StompServerConnection connection)` Removes all subscriptions of the given connection

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

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

- - ### Field Detail

    - #### __TYPE_ARG

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

  - ### Constructor Detail

    - #### Destination

          public Destination(Destination delegate)

    - #### Destination

          public Destination(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 Destination getDelegate()

    - #### topic

          public static Destination topic(Vertx vertx,
                                          String destination)

    - #### queue

          public static Destination queue(Vertx vertx,
                                          String destination)

    - #### bridge

          public static Destination bridge(Vertx vertx,
                                           BridgeOptions options)

    - #### destination

          public String destination()

      Returns:
        the destination address.

    - #### dispatch

          public Destination dispatch(StompServerConnection connection,
                                      Frame frame)

      Dispatches the given frame.
      Parameters:
        `connection` - the connection
        `frame` - the frame
      Returns:
        the current instance of `Destination`

    - #### subscribe

          public Destination subscribe(StompServerConnection connection,
                                       Frame frame)

      Handles a subscription request to the current `Destination`.
      Parameters:
        `connection` - the connection
        `frame` - the `SUBSCRIBE` frame
      Returns:
        the current instance of `Destination`

    - #### unsubscribe

          public boolean unsubscribe(StompServerConnection connection,
                                     Frame frame)

      Handles a un-subscription request to the current `Destination`.
      Parameters:
        `connection` - the connection
        `frame` - the `UNSUBSCRIBE` frame
      Returns:
        `true` if the un-subscription has been handled, `false` otherwise.

    - #### unsubscribeConnection

          public Destination unsubscribeConnection(StompServerConnection connection)

      Removes all subscriptions of the given connection
      Parameters:
        `connection` - the connection
      Returns:
        the current instance of `Destination`

    - #### ack

          public boolean ack(StompServerConnection connection,
                             Frame frame)

      Handles a `ACK` frame.
      Parameters:
        `connection` - the connection
        `frame` - the `ACK` frame
      Returns:
        `true` if the destination has handled the frame (meaning it has sent the message with id)

    - #### nack

          public boolean nack(StompServerConnection connection,
                              Frame frame)

      Handles a `NACK` frame.
      Parameters:
        `connection` - the connection
        `frame` - the `NACK` frame
      Returns:
        `true` if the destination has handled the frame (meaning it has sent the message with id)

    - #### getSubscriptions

          public List<String> getSubscriptions(StompServerConnection connection)

      Gets all subscription ids for the given destination hold by the given client
      Parameters:
        `connection` - the connection (client)
      Returns:
        the list of subscription id, empty if none

    - #### numberOfSubscriptions

          public int numberOfSubscriptions()

      Gets the number of subscriptions attached to the current `Destination`.
      Returns:
        the number of subscriptions.

    - #### matches

          public boolean matches(String address)

      Checks whether or not the given address matches with the current destination.
      Parameters:
        `address` - the address
      Returns:
        `true` if it matches, `false` otherwise.

    - #### newInstance

          public static Destination newInstance(Destination arg)

Copyright © 2023 Eclipse. All rights reserved.