Package com.consol.citrus.channel
Class ChannelConsumer
- java.lang.Object
-
- com.consol.citrus.messaging.AbstractMessageConsumer
-
- com.consol.citrus.messaging.AbstractSelectiveMessageConsumer
-
- com.consol.citrus.channel.ChannelConsumer
-
- All Implemented Interfaces:
com.consol.citrus.messaging.Consumer,com.consol.citrus.messaging.SelectiveConsumer
- Direct Known Subclasses:
ChannelSyncConsumer
public class ChannelConsumer extends com.consol.citrus.messaging.AbstractSelectiveMessageConsumer- Since:
- 1.4
- Author:
- Christoph Deppisch
-
-
Constructor Summary
Constructors Constructor Description ChannelConsumer(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(com.consol.citrus.context.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.com.consol.citrus.message.Messagereceive(String selector, com.consol.citrus.context.TestContext context, long timeout)protected org.springframework.messaging.MessageChannelresolveChannelName(String channelName, com.consol.citrus.context.TestContext context)Resolve the channel by name.-
Methods inherited from class com.consol.citrus.messaging.AbstractSelectiveMessageConsumer
receive, receive
-
-
-
-
Constructor Detail
-
ChannelConsumer
public ChannelConsumer(String name, ChannelEndpointConfiguration endpointConfiguration)
Default constructor using endpoint configuration.- Parameters:
name-endpointConfiguration-
-
-
Method Detail
-
receive
public com.consol.citrus.message.Message receive(String selector, com.consol.citrus.context.TestContext context, long timeout)
-
getDestinationChannel
protected org.springframework.messaging.MessageChannel getDestinationChannel(com.consol.citrus.context.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- the test 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, com.consol.citrus.context.TestContext context)
Resolve the channel by name.- Parameters:
channelName- the name to resolvecontext-- Returns:
- the MessageChannel object
-
-