Class 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.springframework.messaging.MessageChannel getDestinationChannel​(com.consol.citrus.context.TestContext context)
      Get the destination channel depending on settings in this message sender.
      protected String getDestinationChannelName()
      Gets the channel name depending on what is set in this message sender.
      com.consol.citrus.message.Message receive​(String selector, com.consol.citrus.context.TestContext context, long timeout)  
      protected org.springframework.messaging.MessageChannel resolveChannelName​(String channelName, com.consol.citrus.context.TestContext context)
      Resolve the channel by name.
      • Methods inherited from class com.consol.citrus.messaging.AbstractSelectiveMessageConsumer

        receive, receive
      • Methods inherited from class com.consol.citrus.messaging.AbstractMessageConsumer

        getName, receive
      • Methods inherited from interface com.consol.citrus.messaging.Consumer

        getName, 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 resolve
        context -
        Returns:
        the MessageChannel object