public interface MessageCodecContext
| 限定符和类型 | 方法和说明 |
|---|---|
default Optional<Object> |
getConfig(String key)
预留功能,获取配置信息
|
default Map<String,Object> |
getConfiguration()
预留功能,获取配置信息
|
DeviceOperator |
getDevice()
获取当前上下文中到设备操作接口,
在tcp,http等场景下,此接口可能返回
null |
default reactor.core.publisher.Mono<DeviceOperator> |
getDevice(String deviceId)
获取指定设备的操作接口.
|
default reactor.core.publisher.Mono<DeviceOperator> |
getDeviceAsync()
同
getDevice(),只是返回结果是Mono,不会为null. |
@Nullable DeviceOperator getDevice()
nulldefault reactor.core.publisher.Mono<DeviceOperator> getDeviceAsync()
getDevice(),只是返回结果是Mono,不会为null.default reactor.core.publisher.Mono<DeviceOperator> getDevice(String deviceId)
Mono.empty(),可以通过Mono.switchIfEmpty(Mono)进行处理.deviceId - 设备IDCopyright © 2019–2022. All rights reserved.