使用 JSON 格式的管理 (Mgmt) Comm。负责处理完整/格式良好的 Mgmt/JSON 讯息帧并通过通道转发给任何监听器。 更多...
Public 成员函数 | |
| IMgmtMsgListenerChannels< String > | ChannelListenerJson () |
| IMgmtMsgListenerChannels< MgmtMsg > | ChannelListenerMgmtMsg () |
| JsonComm (IComm commToPtr) | |
| 使用传入的连接启动 JSON 通信。 更多... | |
| void | Send (String mgmtMsgToSend) |
| 使用创建对象时传入的连接发送 JSON mgmtMsgToSend。 更多... | |
| String | SendAndWaitForResponse (String mgmtMsg, int respTimeoutMs) |
| 发送 JSON 讯息 mgmtMsg 并等待 respTimeoutMs 后返回响应。 如果超时后未接收到响应,返回空字符串 ""。 更多... | |
| void | Dispose () |
| void | close () |
静态 Public 成员函数 | |
| static String | ReplaceJsonArrayValues (String json) |
Protected 成员函数 | |
| void | Dispose (boolean disposing) |
| void | finalize () throws Throwable |
Private 成员函数 | |
| void | Start () |
| void | MsgFrameSplitterAsync () |
| void | SendAndWaitForMsgFrame (byte[] outmsg, int responseStartTimeout, int responseEndTimeout) |
| String | GetMsgFrame (StringBuilder strUnframed) |
Private 属性 | |
| ListenerChannelsJson | _listenersJsonChnls = new ListenerChannelsJson() |
| ListenerChannelsMgmtMsg | _listenersMgmtMsgChnls = null |
| StringBuilder | _jsonReceived = new StringBuilder() |
| IComm | _jsonComm |
| ExecutorService | _executor |
| Channel< String > | _msgOut |
| boolean | _usingDataPort = false |
| boolean | _disposed = false |
静态 Private 属性 | |
| static final Logger | LOGGER = Logger.getLogger(JsonComm.class.getName()) |
使用 JSON 格式的管理 (Mgmt) Comm。负责处理完整/格式良好的 Mgmt/JSON 讯息帧并通过通道转发给任何监听器。
需要通信连接来发送和接收完整的管理讯息。
此类还使用通信连接发送和接收 JSON 讯息。
注意,此类将会在收到数据时读取从通信连接接收的所有数据,以便于监听和解析完整的 JSON 讯息。
| com.UniPRT.Sdk.Json.JsonComm.JsonComm | ( | IComm | commToPtr | ) |
| IMgmtMsgListenerChannels<String> com.UniPRT.Sdk.Json.JsonComm.ChannelListenerJson | ( | ) |
引用了 com.UniPRT.Sdk.Json.JsonComm._listenersJsonChnls.
被这些函数引用 com.UniPRT.Sdk.Mgmt.Messenger.Messenger(), com.UniPRT.Sdk.Json.OdvMonitor.MsgListenerCtrlRefresh(), com.UniPRT.Sdk.Json.RfidMonitor.MsgListenerCtrlRefresh(), com.UniPRT.Sdk.Json.PrinterMonitor.MsgListenerCtrlRefresh() , 以及 com.UniPRT.Sdk.Json.JsonComm.SendAndWaitForResponse().
| IMgmtMsgListenerChannels<MgmtMsg> com.UniPRT.Sdk.Json.JsonComm.ChannelListenerMgmtMsg | ( | ) |
| void com.UniPRT.Sdk.Json.JsonComm.close | ( | ) |
| void com.UniPRT.Sdk.Json.JsonComm.Dispose | ( | ) |
|
protected |
|
protected |
|
private |
|
private |
|
static |
| void com.UniPRT.Sdk.Json.JsonComm.Send | ( | String | mgmtMsgToSend | ) |
使用创建对象时传入的连接发送 JSON mgmtMsgToSend。
引用了 com.UniPRT.Sdk.Json.JsonComm._msgOut, com.UniPRT.Sdk.Json.JsonStringBuilder.DataPortPrefix, com.UniPRT.Sdk.Json.JsonStringBuilder.DataPortSuffix , 以及 com.UniPRT.Sdk.Mgmt.Channel< T >.TryWrite().
被这些函数引用 com.UniPRT.Sdk.Mgmt.Messenger.SendMsg() , 以及 com.UniPRT.Sdk.Mgmt.Messenger.SendMsgRaw().
|
private |
引用了 com.UniPRT.Sdk.Json.JsonComm._jsonComm, com.UniPRT.Sdk.Json.JsonComm._jsonReceived, com.UniPRT.Sdk.Json.JsonComm._listenersJsonChnls, com.UniPRT.Sdk.Json.JsonComm._listenersMgmtMsgChnls, com.UniPRT.Sdk.Comm.IComm.Connected(), com.UniPRT.Sdk.Json.JsonComm.GetMsgFrame(), com.UniPRT.Sdk.Json.JsonStringTokenizer.GetMsgId_Json(), com.UniPRT.Sdk.Mgmt.AMgmtListenerChannels< T >.ListenerMsgDeposit() , 以及 com.UniPRT.Sdk.Comm.IComm.WriteAndWaitForResponse().
被这些函数引用 com.UniPRT.Sdk.Json.JsonComm.MsgFrameSplitterAsync().
| String com.UniPRT.Sdk.Json.JsonComm.SendAndWaitForResponse | ( | String | mgmtMsg, |
| int | respTimeoutMs | ||
| ) |
发送 JSON 讯息 mgmtMsg 并等待 respTimeoutMs 后返回响应。 如果超时后未接收到响应,返回空字符串 ""。
引用了 com.UniPRT.Sdk.Json.JsonComm._listenersJsonChnls, com.UniPRT.Sdk.Json.JsonComm._msgOut, com.UniPRT.Sdk.Mgmt.MgmtChannelFilterType.ALL_MSGS, com.UniPRT.Sdk.Json.JsonComm.ChannelListenerJson(), com.UniPRT.Sdk.Json.JsonStringBuilder.DataPortPrefix, com.UniPRT.Sdk.Json.JsonStringBuilder.DataPortSuffix, com.UniPRT.Sdk.Json.JsonStringTokenizer.GetMsgId_Json(), com.UniPRT.Sdk.Json.JsonStringTokenizer.GetMsgIdExpectedOnResponse_Json(), com.UniPRT.Sdk.Mgmt.AMgmtListenerChannels< T >.ListenerChannelGetNew(), com.UniPRT.Sdk.Json.JsonComm.LOGGER, com.UniPRT.Sdk.Mgmt.Channel< T >.Poll(), com.UniPRT.Sdk.Json.JsonComm.ReplaceJsonArrayValues() , 以及 com.UniPRT.Sdk.Mgmt.Channel< T >.Write().
被这些函数引用 com.UniPRT.Sdk.Json.SettingsReadWrite.GetAllProperties(), com.UniPRT.Sdk.Json.SettingsReadWrite.GetAllValues(), com.UniPRT.Sdk.Settings.Configs.GetConfig(), com.UniPRT.Sdk.Json.PrinterMonitor.GetEngineStatus(), com.UniPRT.Sdk.Json.PrinterMonitor.GetFaultStatus(), com.UniPRT.Sdk.Json.PrinterMonitor.GetPrinterInfo(), com.UniPRT.Sdk.Json.SettingsReadWrite.GetProperties(), com.UniPRT.Sdk.Json.SettingsReadWrite.GetValue(), com.UniPRT.Sdk.Json.SettingsReadWrite.GetValues(), com.UniPRT.Sdk.Json.PrinterMonitor.SetAlertStatusListening(), com.UniPRT.Sdk.Settings.Configs.SetConfig(), com.UniPRT.Sdk.Json.PrinterMonitor.SetDisplayStatusListening(), com.UniPRT.Sdk.Json.PrinterMonitor.SetEngineStatusListening(), com.UniPRT.Sdk.Json.OdvMonitor.SetOdvReportListening(), com.UniPRT.Sdk.Json.RfidMonitor.SetRfidReportListening(), com.UniPRT.Sdk.Json.SettingsReadWrite.SetValue() , 以及 com.UniPRT.Sdk.Json.SettingsReadWrite.SetValues().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |