Class ReceiptPolicy
java.lang.Object
org.schlunzis.zis.stomp.client.ReceiptPolicy
Policy for requesting receipts from the STOMP server. If the policy is enabled for a specific command, the client will request a receipt from the server for that command.
You can use the all() method to create a policy that requests receipts for all supported commands,
or the none() method to create a policy that does not request any receipts.
You can also use the add(Policy) method to add specific policies to an existing receipt policy.
A ReceiptPolicy can be set on the StompClientBuilder to define the default receipt policy for the client.
- Since:
- 1.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumPolicies for requesting receipts from the STOMP server. -
Method Summary
Modifier and TypeMethodDescriptionadd(ReceiptPolicy.Policy policy) Adds a policy to request receipts for the specified command.static ReceiptPolicyall()Creates a receipt policy that requests receipts for all supported commands.booleanisEnabled(ReceiptPolicy.Policy policy) Checks if the receipt policy is enabled for the specified command.static ReceiptPolicynone()Creates a receipt policy that does not request any receipts.
-
Method Details
-
all
Creates a receipt policy that requests receipts for all supported commands.- Returns:
- a receipt policy that requests receipts for all supported commands
- Since:
- 1.0.0
-
none
Creates a receipt policy that does not request any receipts.- Returns:
- a receipt policy that does not request any receipts
- Since:
- 1.0.0
-
add
Adds a policy to request receipts for the specified command.- Parameters:
policy- the policy to add- Returns:
- the receipt policy instance
- Since:
- 1.0.0
-
isEnabled
Checks if the receipt policy is enabled for the specified command.- Parameters:
policy- the policy to check- Returns:
- true if the receipt policy is enabled for the specified command, false otherwise
- Since:
- 1.0.0
-