Interface SolaceTopicArtifactMapping
-
public interface SolaceTopicArtifactMappingInterface to describe a mapping between a Solace topic expression and schema registry artifact reference. Topic expression follow the solace topic wildcard character rules for matching.
Enables mapping between parameterized Solace topic and schema registry artifact references for example,
Topic 'NA/order/1/cart'
matches topic expression 'NA/order/*/cart'
maps to artifact reference with artifact id: 'Orders'- See Also:
- wildcard character rules for matching
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static SolaceTopicArtifactMappingcreate(String topicExpression)Creates mapping instance with generated artifact id.static SolaceTopicArtifactMappingcreate(String topicExpression, ArtifactReference artifactReference)Creates mapping instance with explicitArtifactReference.static SolaceTopicArtifactMappingcreate(String topicExpression, String artifactId)Creates mapping instance with explicit artifact id.ArtifactReferencegetArtifactReference()Accessor for mappedArtifactReferenceStringgetTopicExpression()Accessor for the topic expressionbooleanmatch(String destinationName)Method for matching a given destination name to a topic expression.
-
-
-
Method Detail
-
create
static SolaceTopicArtifactMapping create(String topicExpression)
Creates mapping instance with generated artifact id. The generated artifact reference will contain the topic expression as the artifact id.
Throws runtime exceptionIllegalArgumentExceptionwhen input parameters are invalid.- Parameters:
topicExpression- The topic expression for matching destination names. Must not be empty or null.- Returns:
SolaceTopicArtifactMappinginstance with generatedArtifactReference
-
create
static SolaceTopicArtifactMapping create(String topicExpression, String artifactId)
Creates mapping instance with explicit artifact id. This creates anArtifactReferencewith the provided artifactId string.
Throws runtime exceptionIllegalArgumentExceptionwhen input parameters are invalid.- Parameters:
topicExpression- The topic expression for matching destination names. Must not be empty or null.artifactId- The artifact id string to set on the generatedArtifactReference. Must not be empty or null.- Returns:
SolaceTopicArtifactMappinginstance with generatedArtifactReference
-
create
static SolaceTopicArtifactMapping create(String topicExpression, ArtifactReference artifactReference)
Creates mapping instance with explicitArtifactReference.
Throws runtime exceptionIllegalArgumentExceptionwhen input parameters are invalid.- Parameters:
topicExpression- The topic expression for matching destination names. Must not be empty or null.artifactReference- The explicitArtifactReferenceto map the destination name.- Returns:
SolaceTopicArtifactMappinginstance with explicitArtifactReference
-
match
boolean match(String destinationName)
Method for matching a given destination name to a topic expression.- Parameters:
destinationName- The destination name to test- Returns:
- True if the name matches the topic expression otherwise, false
-
getArtifactReference
ArtifactReference getArtifactReference()
Accessor for mappedArtifactReference- Returns:
- The mapped
ArtifactReference
-
getTopicExpression
String getTopicExpression()
Accessor for the topic expression- Returns:
- The topic expression
-
-