Interface SolaceTopicArtifactMapping
-
public interface SolaceTopicArtifactMapping
Interface 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 SolaceTopicArtifactMapping
create(String topicExpression)
Creates mapping instance with generated artifact id.static SolaceTopicArtifactMapping
create(String topicExpression, ArtifactReference artifactReference)
Creates mapping instance with explicitArtifactReference
.static SolaceTopicArtifactMapping
create(String topicExpression, String artifactId)
Creates mapping instance with explicit artifact id.ArtifactReference
getArtifactReference()
Accessor for mappedArtifactReference
String
getTopicExpression()
Accessor for the topic expressionboolean
match(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 exceptionIllegalArgumentException
when input parameters are invalid.- Parameters:
topicExpression
- The topic expression for matching destination names. Must not be empty or null.- Returns:
SolaceTopicArtifactMapping
instance with generatedArtifactReference
-
create
static SolaceTopicArtifactMapping create(String topicExpression, String artifactId)
Creates mapping instance with explicit artifact id. This creates anArtifactReference
with the provided artifactId string.
Throws runtime exceptionIllegalArgumentException
when 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:
SolaceTopicArtifactMapping
instance with generatedArtifactReference
-
create
static SolaceTopicArtifactMapping create(String topicExpression, ArtifactReference artifactReference)
Creates mapping instance with explicitArtifactReference
.
Throws runtime exceptionIllegalArgumentException
when input parameters are invalid.- Parameters:
topicExpression
- The topic expression for matching destination names. Must not be empty or null.artifactReference
- The explicitArtifactReference
to map the destination name.- Returns:
SolaceTopicArtifactMapping
instance 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
-
-