优化注释
This commit is contained in:
parent
52ef9a84dd
commit
e2ce28347a
@ -26,9 +26,7 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description:ACK请求处理器
|
* SIP命令类型: ACK请求
|
||||||
* @author: swwheihei
|
|
||||||
* @date: 2020年5月3日 下午5:31:45
|
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class AckRequestProcessor extends SIPRequestProcessorParent implements InitializingBean, ISIPRequestProcessor {
|
public class AckRequestProcessor extends SIPRequestProcessorParent implements InitializingBean, ISIPRequestProcessor {
|
||||||
|
@ -29,9 +29,7 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: BYE请求处理器
|
* SIP命令类型: BYE请求
|
||||||
* @author: lawrencehj
|
|
||||||
* @date: 2021年3月9日
|
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class ByeRequestProcessor extends SIPRequestProcessorParent implements InitializingBean, ISIPRequestProcessor {
|
public class ByeRequestProcessor extends SIPRequestProcessorParent implements InitializingBean, ISIPRequestProcessor {
|
||||||
|
@ -10,9 +10,7 @@ import org.springframework.stereotype.Component;
|
|||||||
import javax.sip.RequestEvent;
|
import javax.sip.RequestEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description:CANCEL请求处理器
|
* SIP命令类型: CANCEL请求
|
||||||
* @author: swwheihei
|
|
||||||
* @date: 2020年5月3日 下午5:32:23
|
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class CancelRequestProcessor extends SIPRequestProcessorParent implements InitializingBean, ISIPRequestProcessor {
|
public class CancelRequestProcessor extends SIPRequestProcessorParent implements InitializingBean, ISIPRequestProcessor {
|
||||||
|
@ -34,9 +34,7 @@ import java.text.ParseException;
|
|||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description:处理INVITE请求
|
* SIP命令类型: INVITE请求
|
||||||
* @author: panll
|
|
||||||
* @date: 2021年1月14日
|
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@Component
|
@Component
|
||||||
|
@ -35,9 +35,7 @@ import java.text.ParseException;
|
|||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: Notify请求处理器
|
* SIP命令类型: NOTIFY请求
|
||||||
* @author: lawrencehj
|
|
||||||
* @date: 2021年1月27日
|
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class NotifyRequestProcessor extends SIPRequestProcessorParent implements InitializingBean, ISIPRequestProcessor {
|
public class NotifyRequestProcessor extends SIPRequestProcessorParent implements InitializingBean, ISIPRequestProcessor {
|
||||||
|
@ -36,9 +36,7 @@ import java.util.Calendar;
|
|||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description:收到注册请求 处理
|
* SIP命令类型: REGISTER请求
|
||||||
* @author: swwheihei
|
|
||||||
* @date: 2020年5月3日 下午4:47:25
|
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class RegisterRequestProcessor extends SIPRequestProcessorParent implements InitializingBean, ISIPRequestProcessor {
|
public class RegisterRequestProcessor extends SIPRequestProcessorParent implements InitializingBean, ISIPRequestProcessor {
|
||||||
|
@ -19,9 +19,7 @@ import javax.sip.message.Response;
|
|||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description:SUBSCRIBE请求处理器
|
* SIP命令类型: SUBSCRIBE请求
|
||||||
* @author: swwheihei
|
|
||||||
* @date: 2020年5月3日 下午5:31:20
|
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class SubscribeRequestProcessor extends SIPRequestProcessorParent implements InitializingBean, ISIPRequestProcessor {
|
public class SubscribeRequestProcessor extends SIPRequestProcessorParent implements InitializingBean, ISIPRequestProcessor {
|
||||||
|
@ -6,6 +6,12 @@ import org.springframework.beans.factory.InitializingBean;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 命令类型: 控制命令
|
||||||
|
* 命令类型: 设备控制: 远程启动, 录像控制(TODO), 报警布防/撤防命令(TODO), 报警复位命令(TODO),
|
||||||
|
* 强制关键帧命令(TODO), 拉框放大/缩小控制命令(TODO), 看守位控制(TODO), 报警复位(TODO)
|
||||||
|
* 命令类型: 设备配置: SVAC编码配置(TODO), 音频参数(TODO), SVAC解码配置(TODO)
|
||||||
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class ControlMessageHandler extends MessageHandlerAbstract implements InitializingBean {
|
public class ControlMessageHandler extends MessageHandlerAbstract implements InitializingBean {
|
||||||
|
|
||||||
|
@ -6,6 +6,10 @@ import org.springframework.beans.factory.InitializingBean;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 命令类型: 通知命令
|
||||||
|
* 命令类型: 状态信息(心跳)报送, 报警通知, 媒体通知, 移动设备位置数据,语音广播通知(TODO), 设备预置位(TODO)
|
||||||
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class NotifyMessageHandler extends MessageHandlerAbstract implements InitializingBean {
|
public class NotifyMessageHandler extends MessageHandlerAbstract implements InitializingBean {
|
||||||
|
|
||||||
|
@ -46,9 +46,6 @@ public class CatalogNotifyMessageHandler extends SIPRequestProcessorParent imple
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SipConfig config;
|
private SipConfig config;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private EventPublisher publisher;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterPropertiesSet() throws Exception {
|
public void afterPropertiesSet() throws Exception {
|
||||||
notifyMessageHandler.addHandler(cmdType, this);
|
notifyMessageHandler.addHandler(cmdType, this);
|
||||||
|
@ -6,6 +6,10 @@ import org.springframework.beans.factory.InitializingBean;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 命令类型: 查询指令
|
||||||
|
* 命令类型: 设备状态, 设备目录信息, 设备信息, 文件目录检索(TODO), 报警(TODO), 设备配置(TODO), 设备预置位(TODO), 移动设备位置数据(TODO)
|
||||||
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class QueryMessageHandler extends MessageHandlerAbstract implements InitializingBean {
|
public class QueryMessageHandler extends MessageHandlerAbstract implements InitializingBean {
|
||||||
|
|
||||||
|
@ -0,0 +1,77 @@
|
|||||||
|
package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.query.cmd;
|
||||||
|
|
||||||
|
import com.genersoft.iot.vmp.conf.SipConfig;
|
||||||
|
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
||||||
|
import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
|
||||||
|
import com.genersoft.iot.vmp.gb28181.bean.GbStream;
|
||||||
|
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
|
||||||
|
import com.genersoft.iot.vmp.gb28181.event.EventPublisher;
|
||||||
|
import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
|
||||||
|
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommanderFroPlatform;
|
||||||
|
import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent;
|
||||||
|
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.IMessageHandler;
|
||||||
|
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.query.QueryMessageHandler;
|
||||||
|
import com.genersoft.iot.vmp.storager.IVideoManagerStorager;
|
||||||
|
import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce;
|
||||||
|
import org.dom4j.Element;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.InitializingBean;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.sip.InvalidArgumentException;
|
||||||
|
import javax.sip.RequestEvent;
|
||||||
|
import javax.sip.SipException;
|
||||||
|
import javax.sip.header.FromHeader;
|
||||||
|
import javax.sip.message.Response;
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class AlarmQueryMessageHandler extends SIPRequestProcessorParent implements InitializingBean, IMessageHandler {
|
||||||
|
|
||||||
|
private Logger logger = LoggerFactory.getLogger(AlarmQueryMessageHandler.class);
|
||||||
|
private final String cmdType = "Alarm";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private QueryMessageHandler queryMessageHandler;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IVideoManagerStorager storager;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SIPCommanderFroPlatform cmderFroPlatform;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SipConfig config;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private EventPublisher publisher;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterPropertiesSet() throws Exception {
|
||||||
|
queryMessageHandler.addHandler(cmdType, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handForDevice(RequestEvent evt, Device device, Element element) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handForPlatform(RequestEvent evt, ParentPlatform parentPlatform, Element rootElement) {
|
||||||
|
|
||||||
|
logger.info("不支持alarm查询");
|
||||||
|
try {
|
||||||
|
responseAck(evt, Response.NOT_FOUND, "not support alarm query");
|
||||||
|
} catch (SipException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (InvalidArgumentException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -6,6 +6,10 @@ import org.springframework.beans.factory.InitializingBean;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 命令类型: 请求动作的应答
|
||||||
|
* 命令类型: 设备控制, 报警通知, 设备目录信息查询, 目录信息查询, 目录收到, 设备信息查询, 设备状态信息查询 ......
|
||||||
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class ResponseMessageHandler extends MessageHandlerAbstract implements InitializingBean {
|
public class ResponseMessageHandler extends MessageHandlerAbstract implements InitializingBean {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user