Class TargetOptions
java.lang.Object
io.vertx.amqp.TargetOptions
Configures an AMQP target terminus.
Maps to the AMQP 1.0 Target terminus properties: durability, expiry policy, timeout, and capabilities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the target terminus address.Gets the list of capabilities to be set on the target terminus.Gets the target terminus durability.Gets the target terminus expiry policy.intGets the target terminus timeout in seconds.setAddress(String address) Sets the target terminus address.setCapabilities(List<String> capabilities) Sets the list of capabilities to be set on the target terminus.setDurability(String durability) Sets the target terminus durability.setExpiryPolicy(String expiryPolicy) Sets the target terminus expiry policy.setTimeout(int timeout) Sets the target terminus timeout in seconds.toJson()
-
Constructor Details
-
TargetOptions
public TargetOptions() -
TargetOptions
-
TargetOptions
-
-
Method Details
-
toJson
-
getAddress
Gets the target terminus address.- Returns:
- the address, or
nullif not set.
-
setAddress
Sets the target terminus address.- Parameters:
address- the address to set- Returns:
- the options
-
getDurability
Gets the target terminus durability.- Returns:
- the durability, or
nullif not set.
-
setDurability
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
Gets the target terminus expiry policy.- Returns:
- the expiry policy, or
nullif not set.
-
setExpiryPolicy
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
-1if not set.
-
setTimeout
Sets the target terminus timeout in seconds. A value of0means the terminus does not expire. A value of-1(default) means not set.- Parameters:
timeout- the timeout in seconds- Returns:
- the options
-
getCapabilities
-
setCapabilities
Sets the list of capabilities to be set on the target terminus.- Parameters:
capabilities- the capabilities.- Returns:
- the options
-