Class 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 Detail

      • ChannelProducer

        public ChannelProducer​(String name,
                               ChannelEndpointConfiguration endpointConfiguration)
        Default constructor using endpoint configuration.
        Parameters:
        name -
        endpointConfiguration -
    • Method Detail

      • send

        public void send​(com.consol.citrus.message.Message message,
                         com.consol.citrus.context.TestContext context)
        Specified by:
        send in interface com.consol.citrus.messaging.Producer
      • 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 -
        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 - the test context
        Returns:
        the MessageChannel object
      • getName

        public String getName()
        Specified by:
        getName in interface com.consol.citrus.messaging.Producer