private void OnBroadcastMessages() { ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "OnBroadcastMessages"); try { while (!this.ExecutorService.WaitForShutdown()) { try { AppNotifyData data = _queue.Dequeue(); AppNotifyService.OnNotifyData(data); } catch (Exception ex) { Log.Exception(PROC, ex); } } } catch (Exception ex) { Log.Exception(PROC, ex); _host = null; } finally { this.Stop(); } }
private void OnReceiveMessages() { ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "OnReceiveMessages"); try { while (!this.ExecutorService.WaitForShutdown()) { try { AppNotifyData data = _queue.Dequeue(); if (data != null && _callback != null) { _callback.NotifyData(data); } } catch (Exception ex) { Log.Exception(PROC, ex); } } } catch (Exception ex) { Log.Exception(PROC, ex); } finally { this.Shutdown(); } }
internal static void OnNotifyData(AppNotifyData data) { ModuleProc PROC = new ModuleProc("AppNotifyService", "OnNotifyData"); try { if (NotifyData != null) { NotifyData(null, new AppNotifyDataEventArgs(data)); } } catch (Exception ex) { Log.Exception(PROC, ex); } }
public void PostMessage(AppNotifyData data) { ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "PostMessage"); try { if (_host != null) { _queue.Enqueue(data); } } catch (Exception ex) { Log.Exception(PROC, ex); _host = null; } }
public void NotifyData(AppNotifyData data) { _queue.Enqueue(data); }
public AppNotifyDataEventArgs(AppNotifyData data) { this.Data = data; }