Class TestClientMessageProcessorHandler
java.lang.Object
io.github.lunasaw.gbproxy.test.handler.TestClientMessageProcessorHandler
- All Implemented Interfaces:
MessageRequestHandler
@Component
public class TestClientMessageProcessorHandler
extends Object
implements MessageRequestHandler
测试专用的Client消息处理器Handler
用于验证客户端MESSAGE请求的处理流程
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbroadcastNotify(DeviceBroadcastNotify broadcastNotify) 处理语音广播通知<T> voiddeviceControl(T deviceControlBase) 处理设备控制命令getConfigDownloadResponse(String userId, String configType) 获取设备配置查询应答getDeviceAlarmNotify(DeviceAlarmQuery deviceAlarmQuery) 获取设备告警通知getDeviceConfigResponse(DeviceConfigDownload deviceConfigDownload) 获取设备配置响应getDeviceInfo(String userId) 获取设备信息 DeviceInfogetDeviceItem(String userId) 获取设备通道信息getDevicePresetQueryResponse(PresetQuery presetQuery) 获取设备预置位查询应答getDeviceRecord(DeviceRecordQuery deviceRecordQuery) 获取设备录像信息 DeviceRecordgetDeviceStatus(String userId) 获取设备状态信息 DeviceStatusgetMobilePositionNotify(MobilePositionQuery mobilePositionQuery) 处理设备移动位置通知getPresetQueryResponse(String userId) 获取设备预置位信息static DeviceAlarmNotifystatic DeviceResponsestatic DeviceConfigResponsestatic DeviceInfostatic DeviceRecordstatic DeviceStatusstatic DeviceKeepLiveNotifystatic MobilePositionNotifystatic PresetQueryResponsestatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic voidvoidupdateCatalog(DeviceResponse catalog) voidupdateDeviceAlarm(DeviceAlarmNotify deviceAlarmNotify) voidupdateDeviceConfig(DeviceConfigResponse deviceConfigResponse) voidupdateDeviceInfo(DeviceInfo deviceInfo) voidupdateDeviceRecord(DeviceRecord deviceRecord) voidupdateDeviceStatus(DeviceStatus deviceStatus) voidupdateMobilePosition(MobilePositionNotify mobilePositionNotify) voidupdatePresetQuery(PresetQueryResponse response) static booleanwaitForAlarm(long timeout, TimeUnit unit) static booleanwaitForCatalog(long timeout, TimeUnit unit) static booleanwaitForDeviceConfig(long timeout, TimeUnit unit) static booleanwaitForDeviceInfo(long timeout, TimeUnit unit) static booleanwaitForDeviceRecord(long timeout, TimeUnit unit) static booleanwaitForDeviceStatus(long timeout, TimeUnit unit) static booleanwaitForKeepalive(long timeout, TimeUnit unit) static booleanwaitForMobilePosition(long timeout, TimeUnit unit) static booleanwaitForPresetQuery(long timeout, TimeUnit unit)
-
Constructor Details
-
TestClientMessageProcessorHandler
public TestClientMessageProcessorHandler()
-
-
Method Details
-
getDeviceRecord
Description copied from interface:MessageRequestHandler获取设备录像信息 DeviceRecord- Specified by:
getDeviceRecordin interfaceMessageRequestHandler- Parameters:
deviceRecordQuery- 设备录像查询- Returns:
- DeviceRecord 设备录像信息
-
getDeviceStatus
Description copied from interface:MessageRequestHandler获取设备状态信息 DeviceStatus- Specified by:
getDeviceStatusin interfaceMessageRequestHandler- Parameters:
userId- 设备Id- Returns:
- DeviceStatus 设备状态信息
-
getDeviceInfo
Description copied from interface:MessageRequestHandler获取设备信息 DeviceInfo- Specified by:
getDeviceInfoin interfaceMessageRequestHandler- Parameters:
userId- 设备Id- Returns:
- DeviceInfo 设备信息
-
getDeviceItem
Description copied from interface:MessageRequestHandler获取设备通道信息- Specified by:
getDeviceItemin interfaceMessageRequestHandler- Parameters:
userId- 设备Id- Returns:
- DeviceResponse 设备通道信息
-
broadcastNotify
Description copied from interface:MessageRequestHandler处理语音广播通知- Specified by:
broadcastNotifyin interfaceMessageRequestHandler- Parameters:
broadcastNotify- 广播通知
-
getDeviceAlarmNotify
Description copied from interface:MessageRequestHandler获取设备告警通知- Specified by:
getDeviceAlarmNotifyin interfaceMessageRequestHandler- Parameters:
deviceAlarmQuery- 告警查询- Returns:
- DeviceAlarmNotify 告警通知
-
getDeviceConfigResponse
Description copied from interface:MessageRequestHandler获取设备配置响应- Specified by:
getDeviceConfigResponsein interfaceMessageRequestHandler- Parameters:
deviceConfigDownload- 配置下载查询- Returns:
- DeviceConfigResponse 配置响应
-
deviceControl
public <T> void deviceControl(T deviceControlBase) Description copied from interface:MessageRequestHandler处理设备控制命令- Specified by:
deviceControlin interfaceMessageRequestHandler- Parameters:
deviceControlBase- 设备控制基础信息
-
getDevicePresetQueryResponse
Description copied from interface:MessageRequestHandler获取设备预置位查询应答- Specified by:
getDevicePresetQueryResponsein interfaceMessageRequestHandler- Returns:
- 预置位查询应答
-
getPresetQueryResponse
Description copied from interface:MessageRequestHandler获取设备预置位信息- Specified by:
getPresetQueryResponsein interfaceMessageRequestHandler- Parameters:
userId- 设备Id- Returns:
- 设备预置位应答
-
updatePresetQuery
-
waitForPresetQuery
- Throws:
InterruptedException
-
hasReceivedPresetQuery
public static boolean hasReceivedPresetQuery() -
getReceivedPresetQuery
-
getConfigDownloadResponse
Description copied from interface:MessageRequestHandler获取设备配置查询应答- Specified by:
getConfigDownloadResponsein interfaceMessageRequestHandler- Parameters:
userId- 设备IdconfigType- 配置类型- Returns:
- 设备配置查询应答
-
getMobilePositionNotify
Description copied from interface:MessageRequestHandler处理设备移动位置通知- Specified by:
getMobilePositionNotifyin interfaceMessageRequestHandler
-
updateMobilePosition
-
updateDeviceAlarm
-
updateDeviceStatus
-
updateDeviceInfo
-
updateDeviceRecord
-
updateDeviceConfig
-
updateCatalog
-
waitForMobilePosition
public static boolean waitForMobilePosition(long timeout, TimeUnit unit) throws InterruptedException - Throws:
InterruptedException
-
hasReceivedMobilePosition
public static boolean hasReceivedMobilePosition() -
getReceivedMobilePosition
-
resetTestState
public static void resetTestState() -
waitForKeepalive
- Throws:
InterruptedException
-
hasReceivedKeepalive
public static boolean hasReceivedKeepalive() -
getReceivedKeepalive
-
waitForAlarm
- Throws:
InterruptedException
-
hasReceivedAlarm
public static boolean hasReceivedAlarm() -
getReceivedAlarm
-
waitForDeviceStatus
- Throws:
InterruptedException
-
hasReceivedDeviceStatus
public static boolean hasReceivedDeviceStatus() -
getReceivedDeviceStatus
-
waitForDeviceInfo
- Throws:
InterruptedException
-
hasReceivedDeviceInfo
public static boolean hasReceivedDeviceInfo() -
getReceivedDeviceInfo
-
waitForDeviceRecord
- Throws:
InterruptedException
-
hasReceivedDeviceRecord
public static boolean hasReceivedDeviceRecord() -
getReceivedDeviceRecord
-
waitForDeviceConfig
- Throws:
InterruptedException
-
hasReceivedDeviceConfig
public static boolean hasReceivedDeviceConfig() -
getReceivedDeviceConfig
-
waitForCatalog
- Throws:
InterruptedException
-
hasReceivedCatalog
public static boolean hasReceivedCatalog() -
getReceivedCatalog
-