Exemple #1
0
 internal void fireBundleEvent(BundleEvent bundleEvent)
 {
     foreach (BundleListener listener in bundleListenerList)
     {
         listener.bundleChanged(bundleEvent);
     }
 }
Exemple #2
0
 /// <summary>
 ///
 /// </summary>
 void IBundleListener.BundleChanged(BundleEvent e)
 {
     if (e.Type == BundleEventType.Stopping)
     {
         if (_processMonitor == null)
         {
             _processMonitor = new ProcessMonitor(_log.Warn, OnProcessKilling);
             _processMonitor.Start();
         }
     }
 }
Exemple #3
0
            public void bundleChanged(BundleEvent e)
            {
                Type   bundleEventType = typeof(BundleEvent);
                String stateString     = e.getType().ToString();

                foreach (FieldInfo fi in bundleEventType.GetFields())
                {
                    if (!fi.IsPublic || !fi.IsStatic || !fi.IsLiteral || !fi.FieldType.Equals(typeof(Int32)))
                    {
                        continue;
                    }
                    Int32 fieldValue = (Int32)fi.GetValue(null);
                    if (e.getType() == fieldValue)
                    {
                        stateString = fi.Name;
                        break;
                    }
                }
                log.Debug(String.Format("{0}状态已改变为[{1}]", e.getBundle().ToString(), stateString));
            }
 public BundleEventDispatcher(ListenerQueue<IBundleListener> listeners, BundleEvent evnt)
 {
     m_queueView = listeners.getView();
     m_event = evnt;
 }
 //////////////////////////////////////////////////////////////////////////
 public void RaiseBundleEvent(BundleEvent evnt)
 {
     m_eventServer.PostEvent(new BundleEventDispatcher(m_bundleListeners, evnt));
     m_eventServer.SendEvent(new SyncBundleEventDispatcher(m_syncBundleListeners, evnt));
 }
 //////////////////////////////////////////////////////////////////////////
 public void RaiseBundleEvent(BundleEvent evnt)
 {
     m_eventServer.PostEvent(new BundleEventDispatcher(m_bundleListeners, evnt));
     m_eventServer.SendEvent(new SyncBundleEventDispatcher(m_syncBundleListeners, evnt));
 }
 public SyncBundleEventDispatcher(ListenerQueue <ISynchronousBundleListener> listeners, BundleEvent evnt)
 {
     m_queueView = listeners.getView();
     m_event     = evnt;
 }