package com.yfd.monitor.gdw2019.transmit.event.response.impl;

import com.yfd.monitor.conf.SipConfig;
import com.yfd.monitor.gdw2019.SipLayer;
import com.yfd.monitor.gdw2019.transmit.SIPProcessorObserver;
import com.yfd.monitor.gdw2019.transmit.event.response.ISIPResponseProcessor;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.sip.ResponseEvent;

/**
 * @description: BYE请求响应器
*
 * @date:   2020年5月3日 下午5:32:05
 */
@Component
public class ByeResponseProcessor implements InitializingBean, ISIPResponseProcessor {

	private final String method = "BYE";

	@Autowired
	private SipLayer sipLayer;

	@Autowired
	private SipConfig config;


	@Autowired
	private SIPProcessorObserver sipProcessorObserver;

	@Override
	public void afterPropertiesSet() throws Exception {
		// 添加消息处理的订阅
		sipProcessorObserver.addResponseProcessor(method, this);
	}
	/**
	 * 处理BYE响应
	 *
	 * @param evt
	 */
	@Override
	public void process(ResponseEvent evt) {
		System.out.println("");
		// TODO Auto-generated method stub
	}


}
