public abstract class DefinedJmsProducer extends JmsProducerImpl
Contains behaviour common to PTP and PAS JMS message producers.
producerSession
log
CONFIRMATION_ID_KEY
Constructor and Description |
---|
DefinedJmsProducer() |
DefinedJmsProducer(ProduceDestination d) |
Modifier and Type | Method and Description |
---|---|
protected abstract javax.jms.Destination |
createDestination(java.lang.String name) |
protected abstract javax.jms.Destination |
createTemporaryDestination() |
protected AdaptrisMessage |
doRequest(AdaptrisMessage msg,
ProduceDestination dest,
long timeout)
Pseudo-synchronous JMS implementation of
request . |
protected void |
produce(AdaptrisMessage msg,
javax.jms.Destination destination,
javax.jms.Destination replyTo) |
void |
produce(AdaptrisMessage msg,
ProduceDestination destination)
Produce the
AdaptrisMessage to the supplied ProduceDestination , over-riding any configured destinations. |
acknowledge, calculateDeliveryMode, calculatePriority, calculateTimeToLive, captureOutgoingMessageDetails, captureOutgoingMessageDetails, close, commit, configuredAcknowledgeMode, configuredCorrelationIdSource, configuredMessageListener, configuredMessageTranslator, createDestination, currentLogger, currentSession, defaultTimeout, getAcknowledgeMode, getCaptureOutgoingMessageDetails, getCorrelationIdSource, getDeliveryMode, getMessageTranslator, getPerMessageProperties, getPriority, getSessionFactory, getTtl, init, isManagedTransaction, logLinkedException, messagePriority, perMessageProperties, prepare, rollback, rollbackTimeout, setAcknowledgeMode, setCaptureOutgoingMessageDetails, setCorrelationIdSource, setDeliveryMode, setMessageTranslator, setPerMessageProperties, setPriority, setSessionFactory, setTtl, setupSession, start, stop, timeToLive, translate
getIgnoreReplyMetadata, produce, request, request, request, request, setIgnoreReplyMetadata, shouldIgnoreReplyMetadata
getDestination, setDestination
createName, createQualifier, decode, encode, getEncoder, getIsTrackingEndpoint, getMessageFactory, getUniqueId, handleConnectionException, isTrackingEndpoint, registerConnection, registerEncoderMessageFactory, retrieveConnection, setEncoder, setIsTrackingEndpoint, setMessageFactory, setUniqueId, withMessageFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decode, encode, getEncoder, getMessageFactory, handleConnectionException, registerConnection, retrieveConnection, setEncoder, setMessageFactory
getUniqueId
createName, createQualifier, isTrackingEndpoint
public DefinedJmsProducer()
public DefinedJmsProducer(ProduceDestination d)
public void produce(AdaptrisMessage msg, ProduceDestination destination) throws ProduceException
AdaptrisMessageSender
AdaptrisMessage
to the supplied ProduceDestination
, over-riding any configured destinations.msg
- the AdaptrisMessage
to producedestination
- the ProduceDestination
to produce toProduceException
- wrapping any underlying ExceptionsAdaptrisMessageSender.produce(AdaptrisMessage, ProduceDestination)
protected void produce(AdaptrisMessage msg, javax.jms.Destination destination, javax.jms.Destination replyTo) throws javax.jms.JMSException, CoreException
javax.jms.JMSException
CoreException
protected AdaptrisMessage doRequest(AdaptrisMessage msg, ProduceDestination dest, long timeout) throws ProduceException
Pseudo-synchronous JMS implementation of request
. Works by i) setting a temporary queue as the
JMSReplyTo
header on the message ii) setting up a temporary consumer on this reply-to queue. The message is then
sent normally using produce
. If the temporary reply listener receives a reply before the timeout, it will create
and return a new AdaptrisMessage
. Otherwise returns null.
doRequest
in class RequestReplyProducerImp
msg
- the request messagestimeout
- the period to wait for a replydest
- the ProduceDestination
to usenull
if the timeout period expiresProduceException
- wrapping any underlying Exception
s#request(AdaptrisMessage,
ProduceDestination, long)
protected abstract javax.jms.Destination createDestination(java.lang.String name) throws javax.jms.JMSException
javax.jms.JMSException
protected abstract javax.jms.Destination createTemporaryDestination() throws javax.jms.JMSException
javax.jms.JMSException