Package org.ow2.joram.jakarta.connector
Class OutboundProducer
- java.lang.Object
-
- org.ow2.joram.jakarta.connector.OutboundProducer
-
- All Implemented Interfaces:
jakarta.jms.MessageProducer,AutoCloseable
- Direct Known Subclasses:
OutboundPublisher,OutboundSender
public class OutboundProducer extends Object implements jakarta.jms.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 jakarta.jms.MessageProducerproducerThe wrapped JMS producer.protected OutboundSessionsessionTheOutboundSessionthis producer belongs to.(package private) booleanvalidfalseif producer is no more valid.
-
Constructor Summary
Constructors Constructor Description OutboundProducer(jakarta.jms.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.jakarta.jms.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(jakarta.jms.Destination dest, jakarta.jms.Message message)Delegates the call to the wrapped producer.voidsend(jakarta.jms.Destination dest, jakarta.jms.Message message, int deliveryMode, int priority, long timeToLive)Delegates the call to the wrapped producer.voidsend(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.voidsend(jakarta.jms.Destination destination, jakarta.jms.Message message, jakarta.jms.CompletionListener completionListener)Delegates the call to the wrapped producer.voidsend(jakarta.jms.Message message)Delegates the call to the wrapped producer.voidsend(jakarta.jms.Message message, int deliveryMode, int priority, long timeToLive)Delegates the call to the wrapped producer.voidsend(jakarta.jms.Message message, int deliveryMode, int priority, long timeToLive, jakarta.jms.CompletionListener completionListener)Delegates the call to the wrapped producer.voidsend(jakarta.jms.Message message, jakarta.jms.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 jakarta.jms.MessageProducer producer
The wrapped JMS producer.
-
valid
boolean valid
falseif producer is no more valid.
-
-
Constructor Detail
-
OutboundProducer
OutboundProducer(jakarta.jms.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 jakarta.jms.IllegalStateExceptionChecks the validity of the subscriber instance.- Throws:
jakarta.jms.IllegalStateException
-
setDisableMessageID
public void setDisableMessageID(boolean value) throws jakarta.jms.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
setDisableMessageIDin interfacejakarta.jms.MessageProducer- Throws:
jakarta.jms.JMSException
-
setDeliveryMode
public void setDeliveryMode(int deliveryMode) throws jakarta.jms.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
setDeliveryModein interfacejakarta.jms.MessageProducer- Throws:
jakarta.jms.JMSException
-
setPriority
public void setPriority(int priority) throws jakarta.jms.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
setPriorityin interfacejakarta.jms.MessageProducer- Throws:
jakarta.jms.JMSException
-
setTimeToLive
public void setTimeToLive(long timeToLive) throws jakarta.jms.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
setTimeToLivein interfacejakarta.jms.MessageProducer- Throws:
jakarta.jms.JMSException
-
setDisableMessageTimestamp
public void setDisableMessageTimestamp(boolean value) throws jakarta.jms.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
setDisableMessageTimestampin interfacejakarta.jms.MessageProducer- Throws:
jakarta.jms.JMSException
-
getDestination
public jakarta.jms.Destination getDestination() throws jakarta.jms.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
getDestinationin interfacejakarta.jms.MessageProducer- Throws:
jakarta.jms.JMSException
-
getDisableMessageID
public boolean getDisableMessageID() throws jakarta.jms.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
getDisableMessageIDin interfacejakarta.jms.MessageProducer- Throws:
jakarta.jms.JMSException
-
getDeliveryMode
public int getDeliveryMode() throws jakarta.jms.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
getDeliveryModein interfacejakarta.jms.MessageProducer- Throws:
jakarta.jms.JMSException
-
getPriority
public int getPriority() throws jakarta.jms.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
getPriorityin interfacejakarta.jms.MessageProducer- Throws:
jakarta.jms.JMSException
-
getTimeToLive
public long getTimeToLive() throws jakarta.jms.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
getTimeToLivein interfacejakarta.jms.MessageProducer- Throws:
jakarta.jms.JMSException
-
getDisableMessageTimestamp
public boolean getDisableMessageTimestamp() throws jakarta.jms.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
getDisableMessageTimestampin interfacejakarta.jms.MessageProducer- Throws:
jakarta.jms.JMSException
-
send
public void send(jakarta.jms.Message message) throws jakarta.jms.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
sendin interfacejakarta.jms.MessageProducer- Throws:
jakarta.jms.JMSException
-
send
public void send(jakarta.jms.Message message, int deliveryMode, int priority, long timeToLive) throws jakarta.jms.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
sendin interfacejakarta.jms.MessageProducer- Throws:
jakarta.jms.JMSException
-
send
public void send(jakarta.jms.Destination dest, jakarta.jms.Message message) throws jakarta.jms.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
sendin interfacejakarta.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.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
sendin interfacejakarta.jms.MessageProducer- Throws:
jakarta.jms.JMSException
-
close
public void close() throws jakarta.jms.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacejakarta.jms.MessageProducer- Throws:
jakarta.jms.JMSException
-
setDeliveryDelay
public void setDeliveryDelay(long deliveryDelay) throws jakarta.jms.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
setDeliveryDelayin interfacejakarta.jms.MessageProducer- Throws:
jakarta.jms.JMSException
-
getDeliveryDelay
public long getDeliveryDelay() throws jakarta.jms.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
getDeliveryDelayin interfacejakarta.jms.MessageProducer- Throws:
jakarta.jms.JMSException
-
send
public void send(jakarta.jms.Message message, jakarta.jms.CompletionListener completionListener) throws jakarta.jms.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
sendin interfacejakarta.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.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
sendin interfacejakarta.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.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
sendin interfacejakarta.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.JMSExceptionDelegates the call to the wrapped producer.- Specified by:
sendin interfacejakarta.jms.MessageProducer- Throws:
jakarta.jms.JMSException
-
-