Interface MessageStubMappingBuilder
- All Known Implementing Classes:
MessageStubMapping.Builder
public interface MessageStubMappingBuilder
Builder interface for creating message stub mappings using a fluent DSL.
-
Method Summary
Modifier and TypeMethodDescriptionatPriority(Integer priority) Sets the priority for this message stub mapping.build()Builds the MessageStubMapping from the current builder state.willTriggerActions(MessageAction... actions) Configures the actions to trigger when this stub matches.Sets the unique identifier for this message stub mapping.withMessageBody(StringValuePattern messagePattern) Sets a pattern to match the message content.withMetadata(Metadata metadata) Sets metadata for this message stub mapping.withMetadata(Metadata.Builder metadata) Sets metadata for this message stub mapping.withMetadata(Map<String, ?> metadata) Sets metadata for this message stub mapping.Sets a human-readable name for this message stub mapping.
-
Method Details
-
withId
Sets the unique identifier for this message stub mapping.- Parameters:
id- the UUID to assign- Returns:
- this builder
-
withName
Sets a human-readable name for this message stub mapping.- Parameters:
name- the name to assign- Returns:
- this builder
-
atPriority
Sets the priority for this message stub mapping. Lower numbers indicate higher priority.- Parameters:
priority- the priority value- Returns:
- this builder
-
withMessageBody
Sets a pattern to match the message content.- Parameters:
messagePattern- the pattern to match against incoming messages- Returns:
- this builder
-
withMetadata
Sets metadata for this message stub mapping.- Parameters:
metadata- the metadata map- Returns:
- this builder
-
withMetadata
Sets metadata for this message stub mapping.- Parameters:
metadata- the metadata object- Returns:
- this builder
-
withMetadata
Sets metadata for this message stub mapping.- Parameters:
metadata- the metadata builder- Returns:
- this builder
-
willTriggerActions
Configures the actions to trigger when this stub matches. This method terminates the builder chain and returns the built MessageStubMapping.- Parameters:
actions- the actions to execute when matched- Returns:
- the built MessageStubMapping
-
build
MessageStubMapping build()Builds the MessageStubMapping from the current builder state.- Returns:
- the built MessageStubMapping
-