Class OutboundProducer
- java.lang.Object
-
- org.objectweb.joram.client.connector.OutboundProducer
-
- All Implemented Interfaces:
AutoCloseable,MessageProducer
- Direct Known Subclasses:
OutboundPublisher,OutboundSender
public class OutboundProducer extends Object implements MessageProducer
AnOutboundProducerinstance wraps a JMS producer for a component involved in outbound messaging.
-
-
Field Summary
Fields Modifier and Type Field Description private static booleanDEBUGprivate static Loggerloggerprotected MessageProducerproducerThe wrapped JMS producer.protected OutboundSessionsessionTheOutboundSessionthis producer belongs to.(package private) booleanvalidfalseif producer is no more valid.
-
Constructor Summary
Constructors Constructor Description OutboundProducer(MessageProducer producer, OutboundSession session)Constructs anOutboundProducerinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckValidity()Checks the validity of the subscriber instance.voidclose()Delegates the call to the wrapped producer.longgetDeliveryDelay()Delegates the call to the wrapped producer.intgetDeliveryMode()Delegates the call to the wrapped producer.DestinationgetDestination()Delegates the call to the wrapped producer.booleangetDisableMessageID()Delegates the call to the wrapped producer.booleangetDisableMessageTimestamp()Delegates the call to the wrapped producer.intgetPriority()Delegates the call to the wrapped producer.longgetTimeToLive()Delegates the call to the wrapped producer.voidsend(Destination dest, Message message)Delegates the call to the wrapped producer.voidsend(Destination dest, Message message, int deliveryMode, int priority, long timeToLive)Delegates the call to the wrapped producer.voidsend(Destination destination, Message message, int deliveryMode, int priority, long timeToLive, CompletionListener completionListener)Delegates the call to the wrapped producer.voidsend(Destination destination, Message message, CompletionListener completionListener)Delegates the call to the wrapped producer.voidsend(Message message)Delegates the call to the wrapped producer.voidsend(Message message, int deliveryMode, int priority, long timeToLive)Delegates the call to the wrapped producer.voidsend(Message message, int deliveryMode, int priority, long timeToLive, CompletionListener completionListener)Delegates the call to the wrapped producer.voidsend(Message message, CompletionListener completionListener)Delegates the call to the wrapped producer.voidsetDeliveryDelay(long deliveryDelay)Delegates the call to the wrapped producer.voidsetDeliveryMode(int deliveryMode)Delegates the call to the wrapped producer.voidsetDisableMessageID(boolean value)Delegates the call to the wrapped producer.voidsetDisableMessageTimestamp(boolean value)Delegates the call to the wrapped producer.voidsetPriority(int priority)Delegates the call to the wrapped producer.voidsetTimeToLive(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
TheOutboundSessionthis producer belongs to.
-
producer
protected MessageProducer producer
The wrapped JMS producer.
-
valid
boolean valid
falseif producer is no more valid.
-
-
Constructor Detail
-
OutboundProducer
OutboundProducer(MessageProducer producer, OutboundSession session)
Constructs anOutboundProducerinstance.- Parameters:
producer- The JMS producer to wrap.session- The OutboundSession this producer belongs to.
-
-
Method Detail
-
checkValidity
protected void checkValidity() throws IllegalStateExceptionChecks the validity of the subscriber instance.- Throws:
IllegalStateException
-
setDisableMessageID
public void setDisableMessageID(boolean value) throws JMSExceptionDelegates the call to the wrapped producer.- Specified by:
setDisableMessageIDin interfaceMessageProducer- Throws:
JMSException
-
setDeliveryMode
public void setDeliveryMode(int deliveryMode) throws JMSExceptionDelegates the call to the wrapped producer.- Specified by:
setDeliveryModein interfaceMessageProducer- Throws:
JMSException
-
setPriority
public void setPriority(int priority) throws JMSExceptionDelegates the call to the wrapped producer.- Specified by:
setPriorityin interfaceMessageProducer- Throws:
JMSException
-
setTimeToLive
public void setTimeToLive(long timeToLive) throws JMSExceptionDelegates the call to the wrapped producer.- Specified by:
setTimeToLivein interfaceMessageProducer- Throws:
JMSException
-
setDisableMessageTimestamp
public void setDisableMessageTimestamp(boolean value) throws JMSExceptionDelegates the call to the wrapped producer.- Specified by:
setDisableMessageTimestampin interfaceMessageProducer- Throws:
JMSException
-
getDestination
public Destination getDestination() throws JMSException
Delegates the call to the wrapped producer.- Specified by:
getDestinationin interfaceMessageProducer- Throws:
JMSException
-
getDisableMessageID
public boolean getDisableMessageID() throws JMSExceptionDelegates the call to the wrapped producer.- Specified by:
getDisableMessageIDin interfaceMessageProducer- Throws:
JMSException
-
getDeliveryMode
public int getDeliveryMode() throws JMSExceptionDelegates the call to the wrapped producer.- Specified by:
getDeliveryModein interfaceMessageProducer- Throws:
JMSException
-
getPriority
public int getPriority() throws JMSExceptionDelegates the call to the wrapped producer.- Specified by:
getPriorityin interfaceMessageProducer- Throws:
JMSException
-
getTimeToLive
public long getTimeToLive() throws JMSExceptionDelegates the call to the wrapped producer.- Specified by:
getTimeToLivein interfaceMessageProducer- Throws:
JMSException
-
getDisableMessageTimestamp
public boolean getDisableMessageTimestamp() throws JMSExceptionDelegates the call to the wrapped producer.- Specified by:
getDisableMessageTimestampin interfaceMessageProducer- Throws:
JMSException
-
send
public void send(Message message) throws JMSException
Delegates the call to the wrapped producer.- Specified by:
sendin interfaceMessageProducer- Throws:
JMSException
-
send
public void send(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
Delegates the call to the wrapped producer.- Specified by:
sendin interfaceMessageProducer- Throws:
JMSException
-
send
public void send(Destination dest, Message message) throws JMSException
Delegates the call to the wrapped producer.- Specified by:
sendin interfaceMessageProducer- Throws:
JMSException
-
send
public void send(Destination dest, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
Delegates the call to the wrapped producer.- Specified by:
sendin interfaceMessageProducer- Throws:
JMSException
-
close
public void close() throws JMSExceptionDelegates the call to the wrapped producer.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceMessageProducer- Throws:
JMSException
-
setDeliveryDelay
public void setDeliveryDelay(long deliveryDelay) throws JMSExceptionDelegates the call to the wrapped producer.- Specified by:
setDeliveryDelayin interfaceMessageProducer- Throws:
JMSException
-
getDeliveryDelay
public long getDeliveryDelay() throws JMSExceptionDelegates the call to the wrapped producer.- Specified by:
getDeliveryDelayin interfaceMessageProducer- Throws:
JMSException
-
send
public void send(Message message, CompletionListener completionListener) throws JMSException
Delegates the call to the wrapped producer.- Specified by:
sendin interfaceMessageProducer- Throws:
JMSException
-
send
public void send(Message message, int deliveryMode, int priority, long timeToLive, CompletionListener completionListener) throws JMSException
Delegates the call to the wrapped producer.- Specified by:
sendin interfaceMessageProducer- Throws:
JMSException
-
send
public void send(Destination destination, Message message, CompletionListener completionListener) throws JMSException
Delegates the call to the wrapped producer.- Specified by:
sendin interfaceMessageProducer- Throws:
JMSException
-
send
public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive, CompletionListener completionListener) throws JMSException
Delegates the call to the wrapped producer.- Specified by:
sendin interfaceMessageProducer- Throws:
JMSException
-
-