Package com.consol.citrus.channel
Class ChannelSyncProducer
- java.lang.Object
-
- com.consol.citrus.channel.ChannelProducer
-
- com.consol.citrus.channel.ChannelSyncProducer
-
- 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 ChannelSyncProducer extends ChannelProducer implements com.consol.citrus.messaging.ReplyConsumer
Synchronous producer sends message to in memory message channel and receives synchronous reply. Reply message is correlated and stored in correlation manager. This way test cases are able to receive synchronous message asynchronously at later time.- Since:
- 1.4
- Author:
- Christoph Deppisch
-
-
Constructor Summary
Constructors Constructor Description ChannelSyncProducer(String name, ChannelSyncEndpointConfiguration endpointConfiguration)Default constructor using endpoint configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CorrelationManager<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.channel.ChannelProducer
getDestinationChannel, getDestinationChannelName, getName, resolveChannelName
-
-
-
-
Constructor Detail
-
ChannelSyncProducer
public ChannelSyncProducer(String name, ChannelSyncEndpointConfiguration 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 classChannelProducer
-
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
-
getCorrelationManager
public CorrelationManager<Message> getCorrelationManager()
Gets the correlation manager.- Returns:
-
setCorrelationManager
public void setCorrelationManager(CorrelationManager<Message> correlationManager)
Sets the correlation manager.- Parameters:
correlationManager-
-
-