org.springframework.jms.connection
Class CachedMessageProducer

java.lang.Object
  extended by org.springframework.jms.connection.CachedMessageProducer

 class CachedMessageProducer
extends java.lang.Object

JMS MessageProducer decorator that adapts calls to a shared MessageProducer instance underneath, managing QoS settings locally within the decorator.

Since:
2.5.3
Author:
Juergen Hoeller

Field Summary
private  int deliveryMode
           
private  java.lang.Boolean originalDisableMessageID
           
private  java.lang.Boolean originalDisableMessageTimestamp
           
private  int priority
           
private  MessageProducer target
           
private  long timeToLive
           
 
Constructor Summary
CachedMessageProducer(MessageProducer target)
           
 
Method Summary
 void close()
           
 int getDeliveryMode()
           
 Destination getDestination()
           
 boolean getDisableMessageID()
           
 boolean getDisableMessageTimestamp()
           
 int getPriority()
           
 Queue getQueue()
           
 long getTimeToLive()
           
 Topic getTopic()
           
 void publish(Message message)
           
 void publish(Message message, int deliveryMode, int priority, long timeToLive)
           
 void publish(Topic topic, Message message)
           
 void publish(Topic topic, Message message, int deliveryMode, int priority, long timeToLive)
           
 void send(Destination destination, Message message)
           
 void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive)
           
 void send(Message message)
           
 void send(Message message, int deliveryMode, int priority, long timeToLive)
           
 void send(Queue queue, Message message)
           
 void send(Queue queue, Message message, int deliveryMode, int priority, long timeToLive)
           
 void setDeliveryMode(int deliveryMode)
           
 void setDisableMessageID(boolean disableMessageID)
           
 void setDisableMessageTimestamp(boolean disableMessageTimestamp)
           
 void setPriority(int priority)
           
 void setTimeToLive(long timeToLive)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

target

private final MessageProducer target

originalDisableMessageID

private java.lang.Boolean originalDisableMessageID

originalDisableMessageTimestamp

private java.lang.Boolean originalDisableMessageTimestamp

deliveryMode

private int deliveryMode

priority

private int priority

timeToLive

private long timeToLive
Constructor Detail

CachedMessageProducer

public CachedMessageProducer(MessageProducer target)
                      throws JMSException
Throws:
JMSException
Method Detail

setDisableMessageID

public void setDisableMessageID(boolean disableMessageID)
                         throws JMSException
Throws:
JMSException

getDisableMessageID

public boolean getDisableMessageID()
                            throws JMSException
Throws:
JMSException

setDisableMessageTimestamp

public void setDisableMessageTimestamp(boolean disableMessageTimestamp)
                                throws JMSException
Throws:
JMSException

getDisableMessageTimestamp

public boolean getDisableMessageTimestamp()
                                   throws JMSException
Throws:
JMSException

setDeliveryMode

public void setDeliveryMode(int deliveryMode)

getDeliveryMode

public int getDeliveryMode()

setPriority

public void setPriority(int priority)

getPriority

public int getPriority()

setTimeToLive

public void setTimeToLive(long timeToLive)

getTimeToLive

public long getTimeToLive()

getDestination

public Destination getDestination()
                           throws JMSException
Throws:
JMSException

getQueue

public Queue getQueue()
               throws JMSException
Throws:
JMSException

getTopic

public Topic getTopic()
               throws JMSException
Throws:
JMSException

send

public void send(Message message)
          throws JMSException
Throws:
JMSException

send

public void send(Message message,
                 int deliveryMode,
                 int priority,
                 long timeToLive)
          throws JMSException
Throws:
JMSException

send

public void send(Destination destination,
                 Message message)
          throws JMSException
Throws:
JMSException

send

public void send(Destination destination,
                 Message message,
                 int deliveryMode,
                 int priority,
                 long timeToLive)
          throws JMSException
Throws:
JMSException

send

public void send(Queue queue,
                 Message message)
          throws JMSException
Throws:
JMSException

send

public void send(Queue queue,
                 Message message,
                 int deliveryMode,
                 int priority,
                 long timeToLive)
          throws JMSException
Throws:
JMSException

publish

public void publish(Message message)
             throws JMSException
Throws:
JMSException

publish

public void publish(Message message,
                    int deliveryMode,
                    int priority,
                    long timeToLive)
             throws JMSException
Throws:
JMSException

publish

public void publish(Topic topic,
                    Message message)
             throws JMSException
Throws:
JMSException

publish

public void publish(Topic topic,
                    Message message,
                    int deliveryMode,
                    int priority,
                    long timeToLive)
             throws JMSException
Throws:
JMSException

close

public void close()
           throws JMSException
Throws:
JMSException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object