Class OutboundProducer

  • All Implemented Interfaces:
    jakarta.jms.MessageProducer, AutoCloseable
    Direct Known Subclasses:
    OutboundPublisher, OutboundSender

    public class OutboundProducer
    extends Object
    implements jakarta.jms.MessageProducer
    An OutboundProducer instance wraps a JMS producer for a component involved in outbound messaging.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static boolean DEBUG  
      private static Logger logger  
      protected jakarta.jms.MessageProducer producer
      The wrapped JMS producer.
      protected OutboundSession session
      The OutboundSession this producer belongs to.
      (package private) boolean valid
      false if producer is no more valid.
    • Constructor Summary

      Constructors 
      Constructor Description
      OutboundProducer​(jakarta.jms.MessageProducer producer, OutboundSession session)
      Constructs an OutboundProducer instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void checkValidity()
      Checks the validity of the subscriber instance.
      void close()
      Delegates the call to the wrapped producer.
      long getDeliveryDelay()
      Delegates the call to the wrapped producer.
      int getDeliveryMode()
      Delegates the call to the wrapped producer.
      jakarta.jms.Destination getDestination()
      Delegates the call to the wrapped producer.
      boolean getDisableMessageID()
      Delegates the call to the wrapped producer.
      boolean getDisableMessageTimestamp()
      Delegates the call to the wrapped producer.
      int getPriority()
      Delegates the call to the wrapped producer.
      long getTimeToLive()
      Delegates the call to the wrapped producer.
      void send​(jakarta.jms.Destination dest, jakarta.jms.Message message)
      Delegates the call to the wrapped producer.
      void send​(jakarta.jms.Destination dest, jakarta.jms.Message message, int deliveryMode, int priority, long timeToLive)
      Delegates the call to the wrapped producer.
      void send​(jakarta.jms.Destination destination, jakarta.jms.Message message, int deliveryMode, int priority, long timeToLive, jakarta.jms.CompletionListener completionListener)
      Delegates the call to the wrapped producer.
      void send​(jakarta.jms.Destination destination, jakarta.jms.Message message, jakarta.jms.CompletionListener completionListener)
      Delegates the call to the wrapped producer.
      void send​(jakarta.jms.Message message)
      Delegates the call to the wrapped producer.
      void send​(jakarta.jms.Message message, int deliveryMode, int priority, long timeToLive)
      Delegates the call to the wrapped producer.
      void send​(jakarta.jms.Message message, int deliveryMode, int priority, long timeToLive, jakarta.jms.CompletionListener completionListener)
      Delegates the call to the wrapped producer.
      void send​(jakarta.jms.Message message, jakarta.jms.CompletionListener completionListener)
      Delegates the call to the wrapped producer.
      void setDeliveryDelay​(long deliveryDelay)
      Delegates the call to the wrapped producer.
      void setDeliveryMode​(int deliveryMode)
      Delegates the call to the wrapped producer.
      void setDisableMessageID​(boolean value)
      Delegates the call to the wrapped producer.
      void setDisableMessageTimestamp​(boolean value)
      Delegates the call to the wrapped producer.
      void setPriority​(int priority)
      Delegates the call to the wrapped producer.
      void setTimeToLive​(long timeToLive)
      Delegates the call to the wrapped producer.
    • Field Detail

      • logger

        private static final Logger logger
      • DEBUG

        private static final boolean DEBUG
      • session

        protected OutboundSession session
        The OutboundSession this producer belongs to.
      • producer

        protected jakarta.jms.MessageProducer producer
        The wrapped JMS producer.
      • valid

        boolean valid
        false if producer is no more valid.
    • Constructor Detail

      • OutboundProducer

        OutboundProducer​(jakarta.jms.MessageProducer producer,
                         OutboundSession session)
        Constructs an OutboundProducer instance.
        Parameters:
        producer - The JMS producer to wrap.
        session - The OutboundSession this producer belongs to.
    • Method Detail

      • checkValidity

        protected void checkValidity()
                              throws jakarta.jms.IllegalStateException
        Checks the validity of the subscriber instance.
        Throws:
        jakarta.jms.IllegalStateException
      • setDisableMessageID

        public void setDisableMessageID​(boolean value)
                                 throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        setDisableMessageID in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException
      • setDeliveryMode

        public void setDeliveryMode​(int deliveryMode)
                             throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        setDeliveryMode in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException
      • setPriority

        public void setPriority​(int priority)
                         throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        setPriority in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException
      • setTimeToLive

        public void setTimeToLive​(long timeToLive)
                           throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        setTimeToLive in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException
      • setDisableMessageTimestamp

        public void setDisableMessageTimestamp​(boolean value)
                                        throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        setDisableMessageTimestamp in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException
      • getDestination

        public jakarta.jms.Destination getDestination()
                                               throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        getDestination in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException
      • getDisableMessageID

        public boolean getDisableMessageID()
                                    throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        getDisableMessageID in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException
      • getDeliveryMode

        public int getDeliveryMode()
                            throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        getDeliveryMode in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException
      • getPriority

        public int getPriority()
                        throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        getPriority in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException
      • getTimeToLive

        public long getTimeToLive()
                           throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        getTimeToLive in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException
      • getDisableMessageTimestamp

        public boolean getDisableMessageTimestamp()
                                           throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        getDisableMessageTimestamp in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException
      • send

        public void send​(jakarta.jms.Message message)
                  throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        send in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException
      • send

        public void send​(jakarta.jms.Message message,
                         int deliveryMode,
                         int priority,
                         long timeToLive)
                  throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        send in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException
      • send

        public void send​(jakarta.jms.Destination dest,
                         jakarta.jms.Message message)
                  throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        send in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException
      • send

        public void send​(jakarta.jms.Destination dest,
                         jakarta.jms.Message message,
                         int deliveryMode,
                         int priority,
                         long timeToLive)
                  throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        send in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException
      • close

        public void close()
                   throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException
      • setDeliveryDelay

        public void setDeliveryDelay​(long deliveryDelay)
                              throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        setDeliveryDelay in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException
      • getDeliveryDelay

        public long getDeliveryDelay()
                              throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        getDeliveryDelay in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException
      • send

        public void send​(jakarta.jms.Message message,
                         jakarta.jms.CompletionListener completionListener)
                  throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        send in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException
      • send

        public void send​(jakarta.jms.Message message,
                         int deliveryMode,
                         int priority,
                         long timeToLive,
                         jakarta.jms.CompletionListener completionListener)
                  throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        send in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException
      • send

        public void send​(jakarta.jms.Destination destination,
                         jakarta.jms.Message message,
                         jakarta.jms.CompletionListener completionListener)
                  throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        send in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException
      • send

        public void send​(jakarta.jms.Destination destination,
                         jakarta.jms.Message message,
                         int deliveryMode,
                         int priority,
                         long timeToLive,
                         jakarta.jms.CompletionListener completionListener)
                  throws jakarta.jms.JMSException
        Delegates the call to the wrapped producer.
        Specified by:
        send in interface jakarta.jms.MessageProducer
        Throws:
        jakarta.jms.JMSException