Package org.citrusframework.actions
Class SendMessageAction
java.lang.Object
org.citrusframework.actions.AbstractTestAction
org.citrusframework.actions.SendMessageAction
- All Implemented Interfaces:
Described,Named,Completable,TestAction,TestActorAware
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAction builder.static classSendMessageAction.SendMessageActionBuilder<T extends SendMessageAction,M extends SendMessageBuilderSupport<T, B, M>, B extends SendMessageAction.SendMessageActionBuilder<T, M, B>> Base send message action builder also used by subclasses of base send message action.static class -
Field Summary
Fields inherited from class org.citrusframework.actions.AbstractTestAction
description -
Constructor Summary
ConstructorsConstructorDescriptionSendMessageAction(SendMessageAction.SendMessageActionBuilder<?, ?, ?> builder) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected MessagecreateMessage(TestContext context, String messageType) Create message to be sent.voiddoExecute(TestContext context) Message is constructed with payload and header entries and sent viaEndpointinstance.Gets the data dictionary.Gets the message endpoint.Gets the endpoint uri.Gets the messageBuilder.Obtains the message processors.Gets the message type for this receive action.getOrCreateEndpoint(TestContext context) Creates or gets the message endpoint instance.Get the name of the schema used for validationGet the name of the schema repository used for validationGet the variable extractors.booleanisDisabled(TestContext context) Checks if this test action is disabled.booleanisDone(TestContext context) booleanGets the forkMode.booleanGetprotected voidvalidateMessage(Message message, TestContext context) Validate the message against registered schemas.Methods inherited from class org.citrusframework.actions.AbstractTestAction
execute, getActor, getDescription, getName, setActor, setDescription, setName
-
Constructor Details
-
SendMessageAction
Default constructor.
-
-
Method Details
-
doExecute
Message is constructed with payload and header entries and sent viaEndpointinstance.- Specified by:
doExecutein classAbstractTestAction
-
validateMessage
Validate the message against registered schemas.- Parameters:
message-
-
isDisabled
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:
isDisabledin interfaceTestAction- Overrides:
isDisabledin classAbstractTestAction- Parameters:
context- the current test context.
-
isDone
- Specified by:
isDonein interfaceCompletable
-
createMessage
Create message to be sent.- Parameters:
context-messageType-- Returns:
-
getOrCreateEndpoint
Creates or gets the message endpoint instance.- Returns:
- the message endpoint
-
getEndpoint
Gets the message endpoint.- Returns:
-
isSchemaValidation
public boolean isSchemaValidation()Get- Returns:
- true if schema validation is active for this message
-
getSchemaRepository
Get the name of the schema repository used for validation- Returns:
- the schema repository name
-
getSchema
Get the name of the schema used for validation- Returns:
- the schema
-
getVariableExtractors
Get the variable extractors.- Returns:
- the variableExtractors
-
getMessageProcessors
Obtains the message processors.- Returns:
-
getMessageBuilder
Gets the messageBuilder.- Returns:
- the messageBuilder
-
isForkMode
public boolean isForkMode()Gets the forkMode.- Returns:
- the forkMode the forkMode to get.
-
getMessageType
Gets the message type for this receive action.- Returns:
- the messageType
-
getDataDictionary
Gets the data dictionary.- Returns:
-
getEndpointUri
Gets the endpoint uri.- Returns:
-