it.netgrid.bauer.helpers.NOPTopicFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bauer-api Show documentation
Show all versions of bauer-api Show documentation
Standard Topic-Based Messaging Facade for Java
package it.netgrid.bauer.helpers;
import java.util.HashMap;
import java.util.Map;
import it.netgrid.bauer.ITopicFactory;
import it.netgrid.bauer.Topic;
public class NOPTopicFactory implements ITopicFactory {
final Map> topics = new HashMap>();
@Override
public Topic getTopic(String name) {
@SuppressWarnings("unchecked")
NOPTopic topic = (NOPTopic)topics.get(name);
if(topic == null) {
topic = new NOPTopic();
topics.put(name, topic);
}
return (Topic) topic;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy