Class TargetOptions

java.lang.Object
io.vertx.amqp.TargetOptions

public class TargetOptions extends Object
Configures an AMQP target terminus.

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

  • Constructor Details

    • TargetOptions

      public TargetOptions()
    • TargetOptions

      public TargetOptions(TargetOptions other)
    • TargetOptions

      public TargetOptions(JsonObject json)
  • Method Details

    • toJson

      public JsonObject toJson()
    • getAddress

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

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

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

      public TargetOptions setDurability(String durability)
      Sets the target 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 target terminus expiry policy.
      Returns:
      the expiry policy, or null if not set.
    • setExpiryPolicy

      public TargetOptions setExpiryPolicy(String expiryPolicy)
      Sets the target 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 target terminus timeout in seconds.
      Returns:
      the timeout, or -1 if not set.
    • setTimeout

      public TargetOptions setTimeout(int timeout)
      Sets the target 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 target terminus.
      Returns:
      the list of capabilities, or null if not set.
    • setCapabilities

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