package com.eactive.eai.adapter.http.dynamic.filter;

import java.util.Properties;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.eactive.eai.common.util.Logger;

public class DebugLoggerInFilter implements HttpAdapterFilter {
	protected static Logger logger = Logger.getLogger(Logger.LOGGER_ADAPTER);
	
	@Override
	public Object doPreFilter(String adptGrpName, String adptName, Object message, Properties prop,
			HttpServletRequest request, HttpServletResponse response) throws Exception {
		logger.debug("Inbound Filter RCV adptGrpName : {}", adptGrpName);
		logger.debug("Inbound Filter RCV adptName : {}", adptName);
		logger.debug("Inbound Filter RCV message : {}", message);
		logger.debug("Inbound Filter RCV prop : {}", prop);
		return message;
	}

	@Override
	public Object doPostFilter(String adptGrpName, String adptName, Object resultMessage, Properties prop,
			HttpServletRequest request, HttpServletResponse response) throws Exception {
		logger.debug("Inbound Filter SND adptGrpName : {}", adptGrpName);
		logger.debug("Inbound Filter SND adptName : {}", adptName);
		logger.debug("Inbound Filter SND resultMessage : {}", resultMessage);
		logger.debug("Inbound Filter SND prop : {}", prop);
		return resultMessage;
	}

}
