class CachedMessageProducer
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private class |
CachedMessageProducer.Jms2MessageProducerInvocationHandler
Reflective InvocationHandler which adapts to JMS 2.0 API methods that we
cannot statically compile against while preserving JMS 1.1 compatibility
(due to the new
javax.jms.CompletionListener type in the signatures). |
Modifier and Type | Field and Description |
---|---|
private static java.lang.Class<?> |
completionListenerClass |
private int |
deliveryMode |
private static java.lang.reflect.Method |
getDeliveryDelayMethod |
private java.lang.Long |
originalDeliveryDelay |
private java.lang.Boolean |
originalDisableMessageID |
private java.lang.Boolean |
originalDisableMessageTimestamp |
private int |
priority |
private static java.lang.reflect.Method |
sendWithCompletionListenerMethod |
private static java.lang.reflect.Method |
sendWithDestinationAndCompletionListenerMethod |
private static java.lang.reflect.Method |
setDeliveryDelayMethod |
private MessageProducer |
target |
private long |
timeToLive |
Constructor and Description |
---|
CachedMessageProducer(MessageProducer target) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
long |
getDeliveryDelay() |
int |
getDeliveryMode() |
Destination |
getDestination() |
boolean |
getDisableMessageID() |
boolean |
getDisableMessageTimestamp() |
int |
getPriority() |
MessageProducer |
getProxyIfNecessary()
Build a dynamic proxy that reflectively adapts to JMS 2.0 API methods, if necessary.
|
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 |
setDeliveryDelay(long deliveryDelay) |
void |
setDeliveryMode(int deliveryMode) |
void |
setDisableMessageID(boolean disableMessageID) |
void |
setDisableMessageTimestamp(boolean disableMessageTimestamp) |
void |
setPriority(int priority) |
void |
setTimeToLive(long timeToLive) |
java.lang.String |
toString() |
private static final java.lang.reflect.Method setDeliveryDelayMethod
private static final java.lang.reflect.Method getDeliveryDelayMethod
private static java.lang.Class<?> completionListenerClass
private static java.lang.reflect.Method sendWithCompletionListenerMethod
private static java.lang.reflect.Method sendWithDestinationAndCompletionListenerMethod
private final MessageProducer target
private java.lang.Boolean originalDisableMessageID
private java.lang.Boolean originalDisableMessageTimestamp
private java.lang.Long originalDeliveryDelay
private int deliveryMode
private int priority
private long timeToLive
public CachedMessageProducer(MessageProducer target) throws JMSException
JMSException
public void setDisableMessageID(boolean disableMessageID) throws JMSException
JMSException
public boolean getDisableMessageID() throws JMSException
JMSException
public void setDisableMessageTimestamp(boolean disableMessageTimestamp) throws JMSException
JMSException
public boolean getDisableMessageTimestamp() throws JMSException
JMSException
public void setDeliveryDelay(long deliveryDelay)
public long getDeliveryDelay()
public void setDeliveryMode(int deliveryMode)
public int getDeliveryMode()
public void setPriority(int priority)
public int getPriority()
public void setTimeToLive(long timeToLive)
public long getTimeToLive()
public Destination getDestination() throws JMSException
JMSException
public Queue getQueue() throws JMSException
JMSException
public Topic getTopic() throws JMSException
JMSException
public void send(Message message) throws JMSException
JMSException
public void send(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
JMSException
public void send(Destination destination, Message message) throws JMSException
JMSException
public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
JMSException
public void send(Queue queue, Message message) throws JMSException
JMSException
public void send(Queue queue, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
JMSException
public void publish(Message message) throws JMSException
JMSException
public void publish(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
JMSException
public void publish(Topic topic, Message message) throws JMSException
JMSException
public void publish(Topic topic, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
JMSException
public void close() throws JMSException
JMSException
public java.lang.String toString()
toString
in class java.lang.Object
public MessageProducer getProxyIfNecessary()