Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
public final static class Source extends AbstractNode implements TopologyDescription.Source {
	// Other methods and variables are not shown here


	@Override
	public String topics() {
		return topics.toString();
    }

	@Override
	public Set<String> topicSet() {
    	return topics;
	}

	@Override
	public Pattern topicPattern() {
    	return topicPattern;
	}
}


public final static class Sink extends AbstractNode implements TopologyDescription.Sink {
	// Other methods and variables are not shown here


	// Output the topic name if dynamic routing is not used. Otherwise, output the toString value of the TopicNameExtractor.
	@Override
	public TopicNameExtractor topicNameExtractor() {
    	if (topicNameExtractor instanceof StaticTopicNameExtractor) {
        	return null;
 		} else {
        	return topicNameExtractor;
		}
	}
}

...