public class ChannelServerAPI extends Object
| 构造器和说明 |
|---|
ChannelServerAPI() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
closeChannel(String channelName,
Map<String,Object> channelParam)
关闭通道
|
ChannelRespondVO |
execute(ChannelRequestVO requestVO)
执行主从半双工操作:上位机向设备问询,并等待设备的回答,直到设备响应或者超时
|
Object |
getReportLock()
获得上报通知的锁对象
默认:ChannelServerAPI的派生类,也就是各个ChannelService的实例
可以通过重载该方法,来指定其他作为同步锁的实例对象
|
ChannelRespondVO |
manageChannel(ChannelRequestVO requestVO)
管理通道操作:上层服务,对通道的管理操作
|
void |
openChannel(String channelName,
Map<String,Object> channelParam)
打开通道
|
void |
publish(ChannelRequestVO requestVO)
执行发布操作:上位机向设备单向发送报文,不需要等待设备的返回
|
List<ChannelRespondVO> |
report()
设备的主动上报消息:设备向上位机
|
public ChannelRespondVO execute(ChannelRequestVO requestVO) throws ServiceException
requestVO - 请求报文ServiceException - 异常信息public void publish(ChannelRequestVO requestVO) throws ServiceException
requestVO - 发布报文ServiceException - 异常信息public List<ChannelRespondVO> report() throws ServiceException
ServiceException - 异常信息public Object getReportLock()
public void openChannel(String channelName, Map<String,Object> channelParam) throws Exception
channelName - 通道名称channelParam - 通道参数Exception - 异常信息public void closeChannel(String channelName, Map<String,Object> channelParam)
channelName - 通道名称channelParam - 通道参数public ChannelRespondVO manageChannel(ChannelRequestVO requestVO) throws ServiceException
requestVO - 发布报文ServiceException - 异常信息Copyright © 2024. All rights reserved.