Package org.apache.qpid.jms.policy
Class JmsDefaultPresettlePolicy
- java.lang.Object
-
- org.apache.qpid.jms.policy.JmsDefaultPresettlePolicy
-
- All Implemented Interfaces:
JmsPresettlePolicy
public class JmsDefaultPresettlePolicy extends java.lang.Object implements JmsPresettlePolicy
Policy object that allows for configuration of options that affect when a JMS MessageProducer will result in AMQP presettled message sends.
-
-
Constructor Summary
Constructors Constructor Description JmsDefaultPresettlePolicy()JmsDefaultPresettlePolicy(JmsDefaultPresettlePolicy source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JmsDefaultPresettlePolicycopy()booleanequals(java.lang.Object obj)inthashCode()booleanisConsumerPresttled(JmsSession session, JmsDestination destination)Determines when a consumer will be created with the settlement mode set to presettled.booleanisPresettleAll()booleanisPresettleConsumers()booleanisPresettleProducers()booleanisPresettleQueueConsumers()booleanisPresettleQueueProducers()booleanisPresettleTopicConsumers()booleanisPresettleTopicProducers()booleanisPresettleTransactedProducers()booleanisProducerPresttled(JmsSession session, JmsDestination destination)Determines when a producer will send message presettled.voidsetPresettleAll(boolean presettleAll)Sets the presettle all sends option.voidsetPresettleConsumers(boolean presettleConsumers)The presettle all consumers value to apply.voidsetPresettleProducers(boolean presettleProducers)Sets the the presettle all sends option.voidsetPresettleQueueConsumers(boolean presettleQueueConsumers)The presettle Queue consumers value to apply.voidsetPresettleQueueProducers(boolean presettleQueueProducers)Sets the presettle Queue sends option.voidsetPresettleTopicConsumers(boolean presettleTopicConsumers)The presettle Topic consumers value to apply.voidsetPresettleTopicProducers(boolean presettleTopicProducers)Sets the presettle Topic sends option.voidsetPresettleTransactedProducers(boolean presettleTransactedProducers)Sets the presettle in transactions option.
-
-
-
Constructor Detail
-
JmsDefaultPresettlePolicy
public JmsDefaultPresettlePolicy()
-
JmsDefaultPresettlePolicy
public JmsDefaultPresettlePolicy(JmsDefaultPresettlePolicy source)
-
-
Method Detail
-
copy
public JmsDefaultPresettlePolicy copy()
- Specified by:
copyin interfaceJmsPresettlePolicy
-
isConsumerPresttled
public boolean isConsumerPresttled(JmsSession session, JmsDestination destination)
Description copied from interface:JmsPresettlePolicyDetermines when a consumer will be created with the settlement mode set to presettled.Called when the a consumer is being created to determine whether the consumer will be configured to request that the remote sends it message that are presettled.
- Specified by:
isConsumerPresttledin interfaceJmsPresettlePolicy- Parameters:
session- the session that owns the consumer being created.destination- the destination that the consumer will be listening to.- Returns:
- true if the producer should send presettled.
-
isProducerPresttled
public boolean isProducerPresttled(JmsSession session, JmsDestination destination)
Description copied from interface:JmsPresettlePolicyDetermines when a producer will send message presettled.Called when the a producer is being created to determine whether the producer will be configured to send all its message as presettled or not.
For an anonymous producer this method is called on each send to allow the policy to be applied to the target destination that the message will be sent to.
- Specified by:
isProducerPresttledin interfaceJmsPresettlePolicy- Parameters:
session- the session that owns the producer.destination- the destination that the producer will be sending to.- Returns:
- true if the producer should send presettled.
-
isPresettleAll
public boolean isPresettleAll()
- Returns:
- the presettleAll setting for this policy
-
setPresettleAll
public void setPresettleAll(boolean presettleAll)
Sets the presettle all sends option. When true all MessageProducers will send their messages presettled.- Parameters:
presettleAll- the presettleAll value to apply.
-
isPresettleProducers
public boolean isPresettleProducers()
- Returns:
- the presettleProducers setting for this policy.
-
setPresettleProducers
public void setPresettleProducers(boolean presettleProducers)
Sets the the presettle all sends option. When true all MessageProducers that are created will send their messages as settled.- Parameters:
presettleProducers- the presettleProducers value to apply.
-
isPresettleTopicProducers
public boolean isPresettleTopicProducers()
- Returns:
- the presettleTopicProducers setting for this policy
-
setPresettleTopicProducers
public void setPresettleTopicProducers(boolean presettleTopicProducers)
Sets the presettle Topic sends option. When true any MessageProducer that is created that sends to a Topic will send its messages presettled, and any anonymous MessageProducer will send Messages that are sent to a Topic as presettled as well.- Parameters:
presettleTopicProducers- the presettleTopicProducers value to apply.
-
isPresettleQueueProducers
public boolean isPresettleQueueProducers()
- Returns:
- the presettleQueueSends setting for this policy
-
setPresettleQueueProducers
public void setPresettleQueueProducers(boolean presettleQueueProducers)
Sets the presettle Queue sends option. When true any MessageProducer that is created that sends to a Queue will send its messages presettled, and any anonymous MessageProducer will send Messages that are sent to a Queue as presettled as well.- Parameters:
presettleQueueProducers- the presettleQueueSends value to apply.
-
isPresettleTransactedProducers
public boolean isPresettleTransactedProducers()
- Returns:
- the presettleTransactedSends setting for this policy
-
setPresettleTransactedProducers
public void setPresettleTransactedProducers(boolean presettleTransactedProducers)
Sets the presettle in transactions option. When true any MessageProducer that is operating inside of a transacted session will send its messages presettled.- Parameters:
presettleTransactedProducers- the presettleTransactedSends to set
-
isPresettleConsumers
public boolean isPresettleConsumers()
- Returns:
- the presettleConsumers configuration value for this policy.
-
setPresettleConsumers
public void setPresettleConsumers(boolean presettleConsumers)
The presettle all consumers value to apply. When true all MessageConsumer instances created will indicate that presettled messages are requested.- Parameters:
presettleConsumers- the presettleConsumers value to apply to this policy.
-
isPresettleTopicConsumers
public boolean isPresettleTopicConsumers()
- Returns:
- the presettleTopicConsumers setting for this policy.
-
setPresettleTopicConsumers
public void setPresettleTopicConsumers(boolean presettleTopicConsumers)
The presettle Topic consumers value to apply. When true any MessageConsumer for a Topic destination will indicate that presettled messages are requested.- Parameters:
presettleTopicConsumers- the presettleTopicConsumers value to apply to this policy.
-
isPresettleQueueConsumers
public boolean isPresettleQueueConsumers()
- Returns:
- the presettleQueueConsumers setting for this policy.
-
setPresettleQueueConsumers
public void setPresettleQueueConsumers(boolean presettleQueueConsumers)
The presettle Queue consumers value to apply. When true any MessageConsumer for a Queue destination will indicate that presettled messages are requested.- Parameters:
presettleQueueConsumers- the presettleQueueConsumers value to apply to this policy.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-