Interface JmsPresettlePolicy

  • All Known Implementing Classes:
    JmsDefaultPresettlePolicy

    public interface JmsPresettlePolicy
    Interface for building policy objects that control when a MessageProducer or MessageConsumer instance will operate in presettled mode.
    • Method Detail

      • isProducerPresttled

        boolean isProducerPresttled​(JmsSession session,
                                    JmsDestination destination)
        Determines 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.

        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.
      • isConsumerPresttled

        boolean isConsumerPresttled​(JmsSession session,
                                    JmsDestination destination)
        Determines 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.

        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.