Package com.consol.citrus.jms.endpoint
Class JmsSyncProducer
- java.lang.Object
-
- com.consol.citrus.jms.endpoint.JmsProducer
-
- com.consol.citrus.jms.endpoint.JmsSyncProducer
-
- All Implemented Interfaces:
com.consol.citrus.messaging.Consumer,com.consol.citrus.messaging.Producer,com.consol.citrus.messaging.ReplyConsumer,com.consol.citrus.messaging.SelectiveConsumer
public class JmsSyncProducer extends JmsProducer implements com.consol.citrus.messaging.ReplyConsumer
- Since:
- 1.4
- Author:
- Christoph Deppisch
-
-
Constructor Summary
Constructors Constructor Description JmsSyncProducer(String name, JmsSyncEndpointConfiguration endpointConfiguration)Default constructor using endpoint configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcreateConnection()Create new JMS connection.protected voidcreateSession(javax.jms.Connection connection)Create new JMS session.voiddestroy()Destroy method closing JMS session and connectionCorrelationManager<Message>getCorrelationManager()Gets the correlation manager.Messagereceive(TestContext context)Messagereceive(TestContext context, long timeout)Messagereceive(String selector, TestContext context)Messagereceive(String selector, TestContext context, long timeout)voidsend(Message message, TestContext context)voidsetCorrelationManager(CorrelationManager<Message> correlationManager)Sets the correlation manager.-
Methods inherited from class com.consol.citrus.jms.endpoint.JmsProducer
getName
-
-
-
-
Constructor Detail
-
JmsSyncProducer
public JmsSyncProducer(String name, JmsSyncEndpointConfiguration endpointConfiguration)
Default constructor using endpoint configuration.- Parameters:
name-endpointConfiguration-
-
-
Method Detail
-
send
public void send(Message message, TestContext context)
- Specified by:
sendin interfacecom.consol.citrus.messaging.Producer- Overrides:
sendin classJmsProducer
-
receive
public Message receive(TestContext context)
- Specified by:
receivein interfacecom.consol.citrus.messaging.Consumer
-
receive
public Message receive(String selector, TestContext context)
- Specified by:
receivein interfacecom.consol.citrus.messaging.SelectiveConsumer
-
receive
public Message receive(TestContext context, long timeout)
- Specified by:
receivein interfacecom.consol.citrus.messaging.Consumer
-
receive
public Message receive(String selector, TestContext context, long timeout)
- Specified by:
receivein interfacecom.consol.citrus.messaging.SelectiveConsumer
-
createConnection
protected void createConnection() throws javax.jms.JMSExceptionCreate new JMS connection.- Throws:
javax.jms.JMSException
-
createSession
protected void createSession(javax.jms.Connection connection) throws javax.jms.JMSExceptionCreate new JMS session.- Parameters:
connection- to use for session creation.- Throws:
javax.jms.JMSException
-
destroy
public void destroy()
Destroy method closing JMS session and connection
-
getCorrelationManager
public CorrelationManager<Message> getCorrelationManager()
Gets the correlation manager.- Returns:
-
setCorrelationManager
public void setCorrelationManager(CorrelationManager<Message> correlationManager)
Sets the correlation manager.- Parameters:
correlationManager-
-
-