Class SourceOptions

java.lang.Object
io.vertx.amqp.SourceOptions

public class SourceOptions extends Object
Configures an AMQP source terminus.

Maps to the AMQP 1.0 Source terminus properties: durability, expiry policy, timeout, and capabilities.

  • Constructor Details

    • SourceOptions

      public SourceOptions()
    • SourceOptions

      public SourceOptions(SourceOptions other)
    • SourceOptions

      public SourceOptions(JsonObject json)
  • Method Details

    • toJson

      public JsonObject toJson()
    • getAddress

      public String getAddress()
      Gets the source terminus address.
      Returns:
      the address, or null if not set.
    • setAddress

      public SourceOptions setAddress(String address)
      Sets the source terminus address.
      Parameters:
      address - the address to set
      Returns:
      the options
    • getDurability

      public String getDurability()
      Gets the source terminus durability.
      Returns:
      the durability, or null if not set.
    • setDurability

      public SourceOptions setDurability(String durability)
      Sets the source terminus durability.

      Accepted values (case-insensitive): NONE, CONFIGURATION, UNSETTLED_STATE.

      Parameters:
      durability - the durability to set
      Returns:
      the options
      Throws:
      IllegalArgumentException - if the value does not match a valid durability
    • getExpiryPolicy

      public String getExpiryPolicy()
      Gets the source terminus expiry policy.
      Returns:
      the expiry policy, or null if not set.
    • setExpiryPolicy

      public SourceOptions setExpiryPolicy(String expiryPolicy)
      Sets the source terminus expiry policy.

      Accepted values (case-insensitive): LINK_DETACH, SESSION_END, CONNECTION_CLOSE, NEVER.

      Parameters:
      expiryPolicy - the expiry policy to set
      Returns:
      the options
      Throws:
      IllegalArgumentException - if the value does not match a valid expiry policy
    • getTimeout

      public int getTimeout()
      Gets the source terminus timeout in seconds.
      Returns:
      the timeout, or -1 if not set.
    • setTimeout

      public SourceOptions setTimeout(int timeout)
      Sets the source terminus timeout in seconds. A value of 0 means the terminus does not expire. A value of -1 (default) means not set.
      Parameters:
      timeout - the timeout in seconds
      Returns:
      the options
    • getCapabilities

      public List<String> getCapabilities()
      Gets the list of capabilities to be set on the source terminus.
      Returns:
      the list of capabilities, or null if not set.
    • setCapabilities

      public SourceOptions setCapabilities(List<String> capabilities)
      Sets the list of capabilities to be set on the source terminus.
      Parameters:
      capabilities - the capabilities.
      Returns:
      the options