package com.eactive.eai.common.routing.rmi;

import java.util.Properties;

import com.eactive.eai.adapter.socket2.common.StopWatch;
import com.eactive.eai.common.util.Logger;
import com.eactive.eai.inbound.processor.GWRequestProcessor;

public class GWRemoteProxyImpl implements GWRemoteProxy {
	
	static Logger logger = Logger.getLogger(Logger.LOGGER_SIFT);

	@Override
	public Object callService(Object message, Properties callProp) {
		Object response = null;

		try {
			StopWatch stopWatch = new StopWatch();
			stopWatch.start();
			
			response = GWRequestProcessor.callService(message, callProp);

			stopWatch.stop();
		} catch(Exception e) {
			logger.error("GWRemoteProxy called service Error : " + e.getMessage(), e);
		}
		
		return response;
	}
}
