| | |
| | | class DeviceSession { |
| | | |
| | | companion object{ |
| | | private const val DEFAULT_DEVICE = "default_device" |
| | | } |
| | | private val deviceMap = ConcurrentHashMap<String, ChannelHandlerContext?>() |
| | | private val typeMap = ConcurrentHashMap<String, List<AirTypeData>>() |
| | | private const val DEFAULT_DEVICE = "default_device" |
| | | |
| | | fun saveDevice(deviceCode: String?, channel: ChannelHandlerContext?) { |
| | | deviceCode?.let { |
| | |
| | | deviceCode == null -> typeMap[DEFAULT_DEVICE] |
| | | typeMap.containsKey(deviceCode) -> typeMap[deviceCode] |
| | | else -> null |
| | | } |
| | | } |
| | | } |
| | | } |