Package org.citrusframework.jms.endpoint
Class JmsSyncProducer
java.lang.Object
org.citrusframework.jms.endpoint.JmsProducer
org.citrusframework.jms.endpoint.JmsSyncProducer
- All Implemented Interfaces:
org.citrusframework.messaging.Consumer,org.citrusframework.messaging.Producer,org.citrusframework.messaging.ReplyConsumer,org.citrusframework.messaging.SelectiveConsumer
public class JmsSyncProducer
extends JmsProducer
implements org.citrusframework.messaging.ReplyConsumer
- Since:
- 1.4
- Author:
- Christoph Deppisch
-
Constructor Summary
ConstructorsConstructorDescriptionJmsSyncProducer(String name, JmsSyncEndpointConfiguration endpointConfiguration) Default constructor using endpoint configuration. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCreate new JMS connection.protected voidcreateSession(jakarta.jms.Connection connection) Create new JMS session.voiddestroy()Destroy method closing JMS session and connectionGets the correlation manager.receive(String selector, TestContext context) receive(String selector, TestContext context, long timeout) receive(TestContext context) receive(TestContext context, long timeout) voidsend(Message message, TestContext context) voidsetCorrelationManager(CorrelationManager<Message> correlationManager) Sets the correlation manager.Methods inherited from class org.citrusframework.jms.endpoint.JmsProducer
getNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.citrusframework.messaging.Consumer
getName
-
Constructor Details
-
JmsSyncProducer
Default constructor using endpoint configuration.- Parameters:
name-endpointConfiguration-
-
-
Method Details
-
send
- Specified by:
sendin interfaceorg.citrusframework.messaging.Producer- Overrides:
sendin classJmsProducer
-
receive
- Specified by:
receivein interfaceorg.citrusframework.messaging.Consumer
-
receive
- Specified by:
receivein interfaceorg.citrusframework.messaging.SelectiveConsumer
-
receive
- Specified by:
receivein interfaceorg.citrusframework.messaging.Consumer
-
receive
- Specified by:
receivein interfaceorg.citrusframework.messaging.SelectiveConsumer
-
createConnection
protected void createConnection() throws jakarta.jms.JMSExceptionCreate new JMS connection.- Throws:
jakarta.jms.JMSException
-
createSession
protected void createSession(jakarta.jms.Connection connection) throws jakarta.jms.JMSException Create new JMS session.- Parameters:
connection- to use for session creation.- Throws:
jakarta.jms.JMSException
-
destroy
public void destroy()Destroy method closing JMS session and connection -
getCorrelationManager
Gets the correlation manager.- Returns:
-
setCorrelationManager
Sets the correlation manager.- Parameters:
correlationManager-
-