Interface DestinationTopicContainer
-
- All Known Subinterfaces:
DestinationTopicResolver
- All Known Implementing Classes:
DefaultDestinationTopicResolver
public interface DestinationTopicContainerProvides methods to store and retrieveDestinationTopicinstances.- Since:
- 2.7
- Author:
- Tomaz Fernandes
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddDestinationTopics(java.util.List<DestinationTopic> destinationTopics)Adds the provided destination topics to the container.DestinationTopicgetDestinationTopicByName(java.lang.String topicName)Returns theDestinationTopicinstance registered for that topic.DestinationTopicgetDltFor(java.lang.String topicName)Returns theDestinationTopicinstance registered as DLT for the given topic, or null if none is found.DestinationTopicgetNextDestinationTopicFor(java.lang.String topicName)Returns theDestinationTopicinstance registered as the next destination topic in the chain for the given topic.
-
-
-
Method Detail
-
addDestinationTopics
void addDestinationTopics(java.util.List<DestinationTopic> destinationTopics)
Adds the provided destination topics to the container.- Parameters:
destinationTopics- theDestinationTopiclist to add.
-
getDestinationTopicByName
DestinationTopic getDestinationTopicByName(java.lang.String topicName)
Returns theDestinationTopicinstance registered for that topic.- Parameters:
topicName- the topic name of the DestinationTopic to be returned.- Returns:
- the DestinationTopic instance registered for that topic.
-
getNextDestinationTopicFor
DestinationTopic getNextDestinationTopicFor(java.lang.String topicName)
Returns theDestinationTopicinstance registered as the next destination topic in the chain for the given topic. Note that this might not correspond to the actual next topic a message will be forwarded to, since that depends on different factors. If you need to find out the exact next topic for a message use theDestinationTopicResolver.resolveDestinationTopic(String, Integer, Exception, long)method instead.- Parameters:
topicName- the topic name of the DestinationTopic to be returned.- Returns:
- the next DestinationTopic in the chain registered for that topic.
-
getDltFor
@Nullable DestinationTopic getDltFor(java.lang.String topicName)
Returns theDestinationTopicinstance registered as DLT for the given topic, or null if none is found.- Parameters:
topicName- the topic name for which to look the DLT for- Returns:
- The
DestinationTopicinstance corresponding to the DLT.
-
-