package cn.com.qmth.examcloud.core.questions.base.processor;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Component;

import cn.com.qmth.examcloud.reports.commons.util.ReportsUtil;
import cn.com.qmth.examcloud.web.support.HttpMethodProcessor;

@Component
public class HttpMethodProcessorImpl implements HttpMethodProcessor {

	@Override
	public void beforeMethod(HttpServletRequest request, Object[] args) {

	}

	@Override
	public void onSuccess(HttpServletRequest request, Object[] args, Object ret) {
		ReportsUtil.sendReport(false);
	}

	@Override
	public void onException(HttpServletRequest request, Object[] args, Throwable e) {
		ReportsUtil.sendReport(true);
	}

}
