Class JmsPoolMessageProducer

java.lang.Object
org.messaginghub.pooled.jms.JmsPoolMessageProducer
All Implemented Interfaces:
AutoCloseable, javax.jms.MessageProducer
Direct Known Subclasses:
JmsPoolQueueSender, JmsPoolTopicPublisher

public class JmsPoolMessageProducer extends Object implements javax.jms.MessageProducer, AutoCloseable
A pooled MessageProducer
  • Constructor Details

    • JmsPoolMessageProducer

      public JmsPoolMessageProducer(JmsPoolSession session, javax.jms.MessageProducer messageProducer, javax.jms.Destination destination, AtomicInteger refCount) throws javax.jms.JMSException
      Throws:
      javax.jms.JMSException
  • Method Details

    • close

      public void close() throws javax.jms.JMSException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • send

      public void send(javax.jms.Message message) throws javax.jms.JMSException
      Specified by:
      send in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • send

      public void send(javax.jms.Message message, int deliveryMode, int priority, long timeToLive) throws javax.jms.JMSException
      Specified by:
      send in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • send

      public void send(javax.jms.Destination destination, javax.jms.Message message) throws javax.jms.JMSException
      Specified by:
      send in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • send

      public void send(javax.jms.Destination destination, javax.jms.Message message, int deliveryMode, int priority, long timeToLive) throws javax.jms.JMSException
      Specified by:
      send in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • send

      public void send(javax.jms.Message message, javax.jms.CompletionListener listener) throws javax.jms.JMSException
      Specified by:
      send in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • send

      public void send(javax.jms.Message message, int deliveryMode, int priority, long timeToLive, javax.jms.CompletionListener listener) throws javax.jms.JMSException
      Specified by:
      send in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • send

      public void send(javax.jms.Destination destination, javax.jms.Message message, javax.jms.CompletionListener listener) throws javax.jms.JMSException
      Specified by:
      send in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • send

      public void send(javax.jms.Destination destination, javax.jms.Message message, int deliveryMode, int priority, long timeToLive, javax.jms.CompletionListener listener) throws javax.jms.JMSException
      Specified by:
      send in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • getDestination

      public javax.jms.Destination getDestination() throws javax.jms.JMSException
      Specified by:
      getDestination in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • getDeliveryMode

      public int getDeliveryMode() throws javax.jms.JMSException
      Specified by:
      getDeliveryMode in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • setDeliveryMode

      public void setDeliveryMode(int deliveryMode) throws javax.jms.JMSException
      Specified by:
      setDeliveryMode in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • getDisableMessageID

      public boolean getDisableMessageID() throws javax.jms.JMSException
      Specified by:
      getDisableMessageID in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • setDisableMessageID

      public void setDisableMessageID(boolean disableMessageID) throws javax.jms.JMSException
      Specified by:
      setDisableMessageID in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • getDisableMessageTimestamp

      public boolean getDisableMessageTimestamp() throws javax.jms.JMSException
      Specified by:
      getDisableMessageTimestamp in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • setDisableMessageTimestamp

      public void setDisableMessageTimestamp(boolean disableMessageTimestamp) throws javax.jms.JMSException
      Specified by:
      setDisableMessageTimestamp in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • getPriority

      public int getPriority() throws javax.jms.JMSException
      Specified by:
      getPriority in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • setPriority

      public void setPriority(int priority) throws javax.jms.JMSException
      Specified by:
      setPriority in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • getTimeToLive

      public long getTimeToLive() throws javax.jms.JMSException
      Specified by:
      getTimeToLive in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • setTimeToLive

      public void setTimeToLive(long timeToLive) throws javax.jms.JMSException
      Specified by:
      setTimeToLive in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • getDeliveryDelay

      public long getDeliveryDelay() throws javax.jms.JMSException
      Specified by:
      getDeliveryDelay in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • setDeliveryDelay

      public void setDeliveryDelay(long deliveryDelay) throws javax.jms.JMSException
      Specified by:
      setDeliveryDelay in interface javax.jms.MessageProducer
      Throws:
      javax.jms.JMSException
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getMessageProducer

      public javax.jms.MessageProducer getMessageProducer() throws javax.jms.JMSException
      Throws:
      javax.jms.JMSException
    • isAnonymousProducer

      public boolean isAnonymousProducer()
      Returns:
      is this MessageProducer wrapper an anonymous variant.
    • getRefCount

      public AtomicInteger getRefCount()
      Returns:
      the reference counter used to manage this wrapper's lifetime.
    • getDelegate

      public javax.jms.MessageProducer getDelegate()
      Returns:
      the underlying MessageProducer that this wrapper object is a proxy to.
    • getDelegateDestination

      public javax.jms.Destination getDelegateDestination()
      Returns:
      the underlying Destination that this wrapper object applies to the delegate MessageProducer.
    • checkClosed

      protected void checkClosed() throws javax.jms.IllegalStateException
      Throws:
      javax.jms.IllegalStateException