public class JmsDefaultRedeliveryPolicy extends Object implements JmsRedeliveryPolicy
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_REDELIVERIES |
static int |
DEFAULT_OUTCOME |
| Constructor and Description |
|---|
JmsDefaultRedeliveryPolicy() |
JmsDefaultRedeliveryPolicy(JmsDefaultRedeliveryPolicy source) |
| Modifier and Type | Method and Description |
|---|---|
JmsDefaultRedeliveryPolicy |
copy() |
boolean |
equals(Object obj) |
int |
getMaxRedeliveries()
Returns the configured maximum redeliveries that a message will be
allowed to have before it is rejected by this client.
|
int |
getMaxRedeliveries(JmsDestination destination)
Returns the configured maximum redeliveries that a message will be
allowed to have before it is rejected by this client for a given destination.
|
int |
getOutcome()
Returns the configured default outcome that will be used when rejecting messages.
|
int |
getOutcome(JmsDestination destination)
Returns the configured outcome that will be used when rejecting the
message by this client for the given destination when the message has
reached the maximum redelivery threshold.
|
int |
hashCode() |
void |
setMaxRedeliveries(int maxRedeliveries)
Configures the maximum number of time a message can be redelivered before it
will be rejected by this client.
|
void |
setOutcome(int outcome)
Set the default outcome to use when rejecting messages using an numeric value, the
possible values are:
|
void |
setOutcome(String outcome)
Set the default outcome to use when rejecting messages using a string value which can
either be the string version of the numeric outcome values or the string name of the
desired outcome, the string names allowed are:
|
public static final int DEFAULT_MAX_REDELIVERIES
public static final int DEFAULT_OUTCOME
public JmsDefaultRedeliveryPolicy()
public JmsDefaultRedeliveryPolicy(JmsDefaultRedeliveryPolicy source)
public JmsDefaultRedeliveryPolicy copy()
copy in interface JmsRedeliveryPolicypublic int getMaxRedeliveries(JmsDestination destination)
JmsRedeliveryPolicyA return value of less than zero is treated as if there is no maximum value set.
getMaxRedeliveries in interface JmsRedeliveryPolicydestination - the destination that the subscription is redelivering from.public int getOutcome(JmsDestination destination)
JmsRedeliveryPolicygetOutcome in interface JmsRedeliveryPolicydestination - the destination that the subscription is redelivering from.public int getOutcome()
Default acknowledgement type is Modified with Failed and Undeliverable here set to true.
public void setOutcome(int outcome)
outcome - the default outcome applied to a rejected delivery.public void setOutcome(String outcome)
outcome - the default outcome applied to a rejected delivery.public int getMaxRedeliveries()
public void setMaxRedeliveries(int maxRedeliveries)
maxRedeliveries - the maxRedeliveries to setCopyright © 2013–2019 The Apache Software Foundation. All rights reserved.