Ejemplo n.º 1
0
        public void removeSubscriberLink(SubscriberLink link)
        {
            SubscriberLink lnk = null;

            lock (subscriber_links_mutex)
            {
                if (Dropped)
                {
                    return;
                }
                if (subscriber_links.Contains(link))
                {
                    lnk = link;
                    subscriber_links.Remove(lnk);
                    if (subscriber_links.Count == 0)
                    {
                        PollManager.Instance.removePollThreadListener(processPublishQueue);
                    }
                }
            }
            if (lnk != null)
            {
                peerDisconnect(lnk);
            }
        }
Ejemplo n.º 2
0
 public void peerDisconnect(SubscriberLink sub_link)
 {
     //EDB.WriteLine("PEER DISCONNECT: [" + sub_link.topic + "]");
     foreach (SubscriberCallbacks cbs in callbacks)
     {
         if (cbs.disconnect != null && cbs.Callback != null)
         {
             CallbackInterface cb = new PeerConnDisconnCallback(cbs.disconnect, sub_link);
             cbs.Callback.addCallback(cb, cbs.Get());
         }
     }
 }
Ejemplo n.º 3
0
        public void addSubscriberLink(SubscriberLink link)
        {
            lock (subscriber_links_mutex)
            {
                if (Dropped)
                {
                    return;
                }
                subscriber_links.Add(link);
            }

            if (Latch && last_message != null)
            {
                link.enqueueMessage(last_message, true, true);
            }

            peerConnect(link);
        }
Ejemplo n.º 4
0
        public void addSubscriberLink(SubscriberLink link)
        {
            lock (subscriber_links_mutex)
            {
                if (Dropped)
                {
                    return;
                }
                subscriber_links.Add(link);
                PollManager.Instance.addPollThreadListener(processPublishQueue);
            }

            if (Latch && last_message != null)
            {
                link.enqueueMessage(last_message);
            }

            peerConnect(link);
        }
Ejemplo n.º 5
0
        public void removeSubscriberLink(SubscriberLink link)
        {
            SubscriberLink lnk = null;

            lock (subscriber_links_mutex)
            {
                if (Dropped)
                {
                    return;
                }
                if (subscriber_links.Contains(link))
                {
                    lnk = link;
                    subscriber_links.Remove(lnk);
                }
            }
            if (lnk != null)
            {
                peerDisconnect(lnk);
            }
        }
Ejemplo n.º 6
0
 public PeerConnDisconnCallback(SubscriberStatusCallback callback, SubscriberLink sub_link)
 {
     this.callback = callback;
     this.sub_link = sub_link;
 }
Ejemplo n.º 7
0
 public SingleSubscriberPublisher(SubscriberLink link)
 {
     this.link = link;
 }
Ejemplo n.º 8
0
 public PeerConnDisconnCallback(SubscriberStatusCallback callback, SubscriberLink sub_link)
 {
     this.callback = callback;
     this.sub_link = sub_link;
 }
Ejemplo n.º 9
0
 public void peerDisconnect(SubscriberLink sub_link)
 {
     //EDB.WriteLine("PEER DISCONNECT: [" + sub_link.topic + "]");
     foreach (SubscriberCallbacks cbs in callbacks)
     {
         if (cbs.disconnect != null && cbs.Callback != null)
         {
             CallbackInterface cb = new PeerConnDisconnCallback(cbs.disconnect, sub_link);
             cbs.Callback.addCallback(cb, cbs.Get());
         }
     }
 }
Ejemplo n.º 10
0
 public void removeSubscriberLink(SubscriberLink link)
 {
     SubscriberLink lnk = null;
     lock (subscriber_links_mutex)
     {
         if (Dropped)
             return;
         if (subscriber_links.Contains(link))
         {
             lnk = link;
             subscriber_links.Remove(lnk);
             if (subscriber_links.Count == 0)
                 PollManager.Instance.removePollThreadListener(processPublishQueue);
         }
     }
     if (lnk != null)
         peerDisconnect(lnk);
 }
Ejemplo n.º 11
0
        public void addSubscriberLink(SubscriberLink link)
        {
            lock (subscriber_links_mutex)
            {
                if (Dropped) return;
                subscriber_links.Add(link);
                PollManager.Instance.addPollThreadListener(processPublishQueue);
            }

            if (Latch && last_message != null)
            {
                link.enqueueMessage(last_message);
            }

            peerConnect(link);
        }