public class JmsSender extends JMSFacade implements ISenderWithParameters
soapAction
Modifier and Type | Class and Description |
---|---|
static class |
JmsSender.LinkMethod |
JMSFacade.AcknowledgeMode, JMSFacade.DeliveryMode, JMSFacade.DestinationType, JMSFacade.SubscriberType
Modifier and Type | Field and Description |
---|---|
protected ParameterList |
paramList |
messagingSource
Constructor and Description |
---|
JmsSender() |
Modifier and Type | Method and Description |
---|---|
void |
addParameter(Parameter p) |
void |
configure()
Configures the sender
|
javax.jms.Destination |
getDestination(PipeLineSession session,
ParameterValueList pvl) |
ParameterList |
getParameterList() |
void |
open()
Starts the sender
|
SenderResult |
sendMessage(Message message,
PipeLineSession session)
Send a message to some destination (as configured in the Sender object).
|
Message |
sendMessage(Message message,
PipeLineSession session,
String soapHeader) |
void |
setDeliveryMode(JMSFacade.DeliveryMode deliveryMode)
Controls mode that messages are sent with
|
void |
setDestinationParam(String string)
Parameter that is used, if specified and not empty, to determine the destination.
|
void |
setEncodingStyleURI(String string)
SOAP encoding style URI
|
void |
setLinkMethod(JmsSender.LinkMethod method)
(Only used when
synchronous =true and replyToName is set). |
void |
setMessageType(String string)
Value of the JMSType field
|
void |
setPriority(int i)
Sets the priority that is used to deliver the message.
|
void |
setReplySoapHeaderSessionKey(String string)
session key to store SOAP header of reply
|
void |
setReplyTimeout(int i)
(Only for
synchronous =true ). |
void |
setReplyToName(String replyTo)
Name of the queue the reply is expected on.
|
void |
setResponseHeadersToSessionKeys(String responseHeaders)
A list of JMS headers of the response to add to the PipeLineSession
|
void |
setServiceNamespaceURI(String string)
SOAP service namespace URI
|
void |
setSoap(boolean b)
If
true , messages sent are put in a SOAP envelope |
void |
setSoapAction(String string)
SOAPAction string sent as message property
|
void |
setSoapHeaderParam(String string)
Name of parameter containing SOAP header
|
void |
setSynchronous(boolean synchronous)
If
true , the sender operates in RR mode: A reply is expected, either on the queue specified in replyToName , or on a dynamically generated temporary queue |
String |
toString() |
checkTransactionManagerValidity, close, closeSession, createMessage, createSession, extractMessage, extractMessageBody, getAcknowledgeModeEnum, getConnectionFactoryInfo, getConnectionFactoryName, getContext, getDestination, getDestination, getJmsMessagingSource, getLogPrefix, getManagedConnectionFactory, getMessageConsumer, getMessageConsumer, getMessageConsumerForCorrelationId, getMessageProducer, getMessagingSource, getMessagingSourceFactory, getPhysicalDestinationName, getPhysicalDestinationShortName, getPhysicalDestinationShortName, isSessionsArePooled, logMessageDetails, send, send, send, send, send, send, send, sendByQueue, sendByTopic, setAckMode, setAcknowledgeMode, setAuthAlias, setCorrelationIdMaxLength, setCorrelationIdToHex, setCorrelationIdToHexPrefix, setDestinationName, setDestinationType, setJmsTransacted, setLookupDestination, setMessageCorrelationID, setMessageSelector, setMessageTimeToLive, setPersistent, setQueueConnectionFactoryName, setSubscriberType, setTopicConnectionFactoryName, setTransacted, useJms102
getContext, getJndiEnv, setAuthentication, setCredentials, setInitialContextFactoryName, setJmsRealm, setJndiAuthAlias, setJndiContextPrefix, setJndiProperties, setName, setPrincipal, setProviderURL, setSecurityProtocol, setUrlPkgPrefixes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
consumesSessionVariable
close, isSynchronous, sendMessageOrThrow
getName, setName
getApplicationContext, getName
getConfigurationClassLoader
setApplicationContext
getDomain
isTransacted
protected ParameterList paramList
public void configure() throws ConfigurationException
configure
in interface IConfigurable
configure
in interface ISender
configure
in class JMSFacade
ConfigurationException
public void open() throws SenderException
open
in interface ISender
open
in class JMSFacade
SenderException
public void addParameter(Parameter p)
addParameter
in interface IWithParameters
public ParameterList getParameterList()
getParameterList
in interface IWithParameters
public SenderResult sendMessage(Message message, PipeLineSession session) throws SenderException, TimeoutException
ISender
configure()
method is called.
The following table shows the difference between synchronous and a-synchronous senders:
synchronous | a-synchronous | |
---|---|---|
ISender.isSynchronous() returns | true | false |
return value of sendMessage() is | the reply-message | the messageId of the message sent |
the correlationID specified with sendMessage() | may be ignored | is sent with the message |
a {link TimeOutException} | may be thrown if a timeout occurs waiting for a reply | should not be expected |
Multiple objects may try to call this method at the same time, from different threads.
Implementations of this method should therefore be thread-safe, or synchronized
.
sendMessage
in interface ISender
SenderException
TimeoutException
public Message sendMessage(Message message, PipeLineSession session, String soapHeader) throws SenderException, TimeoutException
SenderException
TimeoutException
public javax.jms.Destination getDestination(PipeLineSession session, ParameterValueList pvl) throws JmsException, NamingException, javax.jms.JMSException
JmsException
NamingException
javax.jms.JMSException
public void setDestinationParam(String string)
destination
attributepublic void setSynchronous(boolean synchronous)
true
, the sender operates in RR mode: A reply is expected, either on the queue specified in replyToName
, or on a dynamically generated temporary queuepublic void setReplyToName(String replyTo)
public void setLinkMethod(JmsSender.LinkMethod method)
synchronous
=true
and replyToName
is set). Indicates whether the server uses the correlationId from the pipeline, the correlationId from the message or the messageId in the correlationId field of the reply. This requires the sender to have set the correlationId at the time of sending.public void setReplyTimeout(int i)
synchronous
=true
). Maximum time in ms to wait for a reply. 0 means no timeout.public void setMessageType(String string)
public void setDeliveryMode(JMSFacade.DeliveryMode deliveryMode)
public void setPriority(int i)
public void setSoap(boolean b)
true
, messages sent are put in a SOAP envelopepublic void setEncodingStyleURI(String string)
public void setServiceNamespaceURI(String string)
public void setSoapAction(String string)
public void setSoapHeaderParam(String string)
public void setReplySoapHeaderSessionKey(String string)
public void setResponseHeadersToSessionKeys(String responseHeaders)
Copyright © 2023 Frank!Framework. All rights reserved.