Package com.consol.citrus.channel
Class ChannelProducer
- java.lang.Object
-
- com.consol.citrus.channel.ChannelProducer
-
- All Implemented Interfaces:
com.consol.citrus.messaging.Producer
- Direct Known Subclasses:
ChannelSyncProducer
public class ChannelProducer extends Object implements com.consol.citrus.messaging.Producer
- Since:
- 1.4
- Author:
- Christoph Deppisch
-
-
Constructor Summary
Constructors Constructor Description ChannelProducer(String name, ChannelEndpointConfiguration endpointConfiguration)Default constructor using endpoint configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.messaging.MessageChannelgetDestinationChannel(TestContext context)Get the destination channel depending on settings in this message sender.protected StringgetDestinationChannelName()Gets the channel name depending on what is set in this message sender.StringgetName()protected org.springframework.messaging.MessageChannelresolveChannelName(String channelName, TestContext context)Resolve the channel by name.voidsend(Message message, TestContext context)
-
-
-
Constructor Detail
-
ChannelProducer
public ChannelProducer(String name, ChannelEndpointConfiguration 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
-
getDestinationChannel
protected org.springframework.messaging.MessageChannel getDestinationChannel(TestContext context)
Get the destination channel depending on settings in this message sender. Either a direct channel object is set or a channel name which will be resolved to a channel.- Parameters:
context-- Returns:
- the destination channel object.
-
getDestinationChannelName
protected String getDestinationChannelName()
Gets the channel name depending on what is set in this message sender. Either channel name is set directly or channel object is consulted for channel name.- Returns:
- the channel name.
-
resolveChannelName
protected org.springframework.messaging.MessageChannel resolveChannelName(String channelName, TestContext context)
Resolve the channel by name.- Parameters:
channelName- the name to resolvecontext- the test context- Returns:
- the MessageChannel object
-
getName
public String getName()
- Specified by:
getNamein interfacecom.consol.citrus.messaging.Producer
-
-