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 TypeMethodDescriptionvoid
broadcastNotify
(DeviceBroadcastNotify broadcastNotify) 处理语音广播通知<T> void
deviceControl
(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 DeviceAlarmNotify
static DeviceResponse
static DeviceConfigResponse
static DeviceInfo
static DeviceRecord
static DeviceStatus
static DeviceKeepLiveNotify
static MobilePositionNotify
static PresetQueryResponse
static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
static void
void
updateCatalog
(DeviceResponse catalog) void
updateDeviceAlarm
(DeviceAlarmNotify deviceAlarmNotify) void
updateDeviceConfig
(DeviceConfigResponse deviceConfigResponse) void
updateDeviceInfo
(DeviceInfo deviceInfo) void
updateDeviceRecord
(DeviceRecord deviceRecord) void
updateDeviceStatus
(DeviceStatus deviceStatus) void
updateMobilePosition
(MobilePositionNotify mobilePositionNotify) void
updatePresetQuery
(PresetQueryResponse response) static boolean
waitForAlarm
(long timeout, TimeUnit unit) static boolean
waitForCatalog
(long timeout, TimeUnit unit) static boolean
waitForDeviceConfig
(long timeout, TimeUnit unit) static boolean
waitForDeviceInfo
(long timeout, TimeUnit unit) static boolean
waitForDeviceRecord
(long timeout, TimeUnit unit) static boolean
waitForDeviceStatus
(long timeout, TimeUnit unit) static boolean
waitForKeepalive
(long timeout, TimeUnit unit) static boolean
waitForMobilePosition
(long timeout, TimeUnit unit) static boolean
waitForPresetQuery
(long timeout, TimeUnit unit)
-
Constructor Details
-
TestClientMessageProcessorHandler
public TestClientMessageProcessorHandler()
-
-
Method Details
-
getDeviceRecord
Description copied from interface:MessageRequestHandler
获取设备录像信息 DeviceRecord- Specified by:
getDeviceRecord
in interfaceMessageRequestHandler
- Parameters:
deviceRecordQuery
- 设备录像查询- Returns:
- DeviceRecord 设备录像信息
-
getDeviceStatus
Description copied from interface:MessageRequestHandler
获取设备状态信息 DeviceStatus- Specified by:
getDeviceStatus
in interfaceMessageRequestHandler
- Parameters:
userId
- 设备Id- Returns:
- DeviceStatus 设备状态信息
-
getDeviceInfo
Description copied from interface:MessageRequestHandler
获取设备信息 DeviceInfo- Specified by:
getDeviceInfo
in interfaceMessageRequestHandler
- Parameters:
userId
- 设备Id- Returns:
- DeviceInfo 设备信息
-
getDeviceItem
Description copied from interface:MessageRequestHandler
获取设备通道信息- Specified by:
getDeviceItem
in interfaceMessageRequestHandler
- Parameters:
userId
- 设备Id- Returns:
- DeviceResponse 设备通道信息
-
broadcastNotify
Description copied from interface:MessageRequestHandler
处理语音广播通知- Specified by:
broadcastNotify
in interfaceMessageRequestHandler
- Parameters:
broadcastNotify
- 广播通知
-
getDeviceAlarmNotify
Description copied from interface:MessageRequestHandler
获取设备告警通知- Specified by:
getDeviceAlarmNotify
in interfaceMessageRequestHandler
- Parameters:
deviceAlarmQuery
- 告警查询- Returns:
- DeviceAlarmNotify 告警通知
-
getDeviceConfigResponse
Description copied from interface:MessageRequestHandler
获取设备配置响应- Specified by:
getDeviceConfigResponse
in interfaceMessageRequestHandler
- Parameters:
deviceConfigDownload
- 配置下载查询- Returns:
- DeviceConfigResponse 配置响应
-
deviceControl
public <T> void deviceControl(T deviceControlBase) Description copied from interface:MessageRequestHandler
处理设备控制命令- Specified by:
deviceControl
in interfaceMessageRequestHandler
- Parameters:
deviceControlBase
- 设备控制基础信息
-
getDevicePresetQueryResponse
Description copied from interface:MessageRequestHandler
获取设备预置位查询应答- Specified by:
getDevicePresetQueryResponse
in interfaceMessageRequestHandler
- Returns:
- 预置位查询应答
-
getPresetQueryResponse
Description copied from interface:MessageRequestHandler
获取设备预置位信息- Specified by:
getPresetQueryResponse
in interfaceMessageRequestHandler
- Parameters:
userId
- 设备Id- Returns:
- 设备预置位应答
-
updatePresetQuery
-
waitForPresetQuery
- Throws:
InterruptedException
-
hasReceivedPresetQuery
public static boolean hasReceivedPresetQuery() -
getReceivedPresetQuery
-
getConfigDownloadResponse
Description copied from interface:MessageRequestHandler
获取设备配置查询应答- Specified by:
getConfigDownloadResponse
in interfaceMessageRequestHandler
- Parameters:
userId
- 设备IdconfigType
- 配置类型- Returns:
- 设备配置查询应答
-
getMobilePositionNotify
Description copied from interface:MessageRequestHandler
处理设备移动位置通知- Specified by:
getMobilePositionNotify
in 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
-