Class SendMessageAction

  • All Implemented Interfaces:
    com.consol.citrus.common.Described, com.consol.citrus.common.Named, com.consol.citrus.Completable, com.consol.citrus.TestAction, com.consol.citrus.TestActorAware

    public class SendMessageAction
    extends AbstractTestAction
    implements com.consol.citrus.Completable
    This action sends a messages to a specified message endpoint. The action holds a reference to a Endpoint, which is capable of the message transport implementation. So action is independent of the message transport configuration.
    Since:
    2008
    Author:
    Christoph Deppisch
    • Method Detail

      • doExecute

        public void doExecute​(com.consol.citrus.context.TestContext context)
        Message is constructed with payload and header entries and sent via Endpoint instance.
        Specified by:
        doExecute in class AbstractTestAction
      • isDisabled

        public boolean isDisabled​(com.consol.citrus.context.TestContext context)
        Checks if this test action is disabled. Delegates to test actor defined for this test action by default. Subclasses may add additional disabled logic here.
        Specified by:
        isDisabled in interface com.consol.citrus.TestAction
        Overrides:
        isDisabled in class AbstractTestAction
        Parameters:
        context - the current test context.
      • isDone

        public boolean isDone​(com.consol.citrus.context.TestContext context)
        Specified by:
        isDone in interface com.consol.citrus.Completable
      • createMessage

        protected com.consol.citrus.message.Message createMessage​(com.consol.citrus.context.TestContext context,
                                                                  String messageType)
        Create message to be sent.
        Parameters:
        context -
        messageType -
        Returns:
      • getOrCreateEndpoint

        public com.consol.citrus.endpoint.Endpoint getOrCreateEndpoint​(com.consol.citrus.context.TestContext context)
        Creates or gets the message endpoint instance.
        Returns:
        the message endpoint
      • getEndpoint

        public com.consol.citrus.endpoint.Endpoint getEndpoint()
        Gets the message endpoint.
        Returns:
      • getVariableExtractors

        public List<com.consol.citrus.variable.VariableExtractor> getVariableExtractors()
        Get the variable extractors.
        Returns:
        the variableExtractors
      • getMessageProcessors

        public List<com.consol.citrus.message.MessageProcessor> getMessageProcessors()
        Obtains the message processors.
        Returns:
      • getMessageBuilder

        public com.consol.citrus.message.MessageBuilder getMessageBuilder()
        Gets the messageBuilder.
        Returns:
        the messageBuilder
      • isForkMode

        public boolean isForkMode()
        Gets the forkMode.
        Returns:
        the forkMode the forkMode to get.
      • getMessageType

        public String getMessageType()
        Gets the message type for this receive action.
        Returns:
        the messageType
      • getDataDictionary

        public com.consol.citrus.variable.dictionary.DataDictionary<?> getDataDictionary()
        Gets the data dictionary.
        Returns:
      • getEndpointUri

        public String getEndpointUri()
        Gets the endpoint uri.
        Returns: