All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gw.common.utils.ContentHandler Maven / Gradle / Ivy

The newest version!
package com.gw.common.utils;

import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ContentHandler {

	protected Logger logger = LoggerFactory.getLogger(this.getClass());
	protected String matchTopic;
	protected String topicPrefix;
	protected String poolKey;

	public void setTopic(String topic) {
		matchTopic = topic;
		int end = topic.indexOf("*");
		if (end >= 0) {
			topicPrefix = topic.substring(0, end);
		} else {
			topicPrefix = topic;
		}
		logger.debug("ContentHandler: {},{}", matchTopic, topicPrefix);
	}

	public String getPoolKey() {
		return poolKey;
	}

	public void setPoolKey(String poolKey) {
		this.poolKey = poolKey;
	}

	public String getTopicPrefix() {
		return topicPrefix;
	}

	public String getMatchTopic() {
		return matchTopic;
	} 
 
	public Map snapshot(String topic, Message message, Map map, boolean fromList) {
		// TODO Auto-generated method stub
		return map;
	}

	 
	public Map handle(String topic, Message message, String content, Map map,
			boolean fromList) {
		// TODO Auto-generated method stub
		return map;
	}

	 

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy