Class Destination

java.lang.Object
io.vertx.mutiny.ext.stomp.Destination
All Implemented Interfaces:
MutinyDelegate

public class Destination extends Object implements MutinyDelegate
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 Mutiny-ified interface using Vert.x codegen.

  • Field Details

  • Constructor Details

    • Destination

      public Destination(io.vertx.ext.stomp.Destination delegate)
    • Destination

      public Destination(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.ext.stomp.Destination getDelegate()
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate used by this Mutiny object of generated type
    • 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
    • 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, io.vertx.ext.stomp.BridgeOptions options)
    • destination

      public String destination()
      Returns:
      the destination address.
    • dispatch

      public Destination dispatch(StompServerConnection connection, io.vertx.ext.stomp.Frame frame)
      Parameters:
      connection - the connection
      frame - the frame
      Returns:
      the current instance of Destination
    • subscribe

      public Destination subscribe(StompServerConnection connection, io.vertx.ext.stomp.Frame frame)
      Parameters:
      connection - the connection
      frame - the SUBSCRIBE frame
      Returns:
      the current instance of Destination
    • unsubscribe

      public boolean unsubscribe(StompServerConnection connection, io.vertx.ext.stomp.Frame frame)
      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)
      Parameters:
      connection - the connection
      Returns:
      the current instance of Destination
    • ack

      public boolean ack(StompServerConnection connection, io.vertx.ext.stomp.Frame 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, io.vertx.ext.stomp.Frame 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)
      Parameters:
      connection - the connection (client)
      Returns:
      the list of subscription id, empty if none
    • numberOfSubscriptions

      public int numberOfSubscriptions()
      Returns:
      the number of subscriptions.
    • matches

      public boolean matches(String address)
      Parameters:
      address - the address
      Returns:
      true if it matches, false otherwise.
    • newInstance

      public static Destination newInstance(io.vertx.ext.stomp.Destination arg)