Package org.cybergarage.upnp.event

Examples of org.cybergarage.upnp.event.SubscriberList


    getSubscriberList().remove(sub);
  }

  public Subscriber getSubscriber(String name)
  {
    SubscriberList subList = getSubscriberList();
    int subListCnt = subList.size();
    for (int n=0; n<subListCnt; n++) {
      Subscriber sub = subList.getSubscriber(n);
      if (sub == null)
        continue;
      String sid = sub.getSID();
      if (sid == null)
        continue;
View Full Code Here


    return true;
  }

  public void notify(StateVariable stateVar)
  {
    SubscriberList subList = getSubscriberList();
    int subListCnt;
    Subscriber subs[];
   
    // Remove expired subscribers.
    subListCnt = subList.size();
    subs = new Subscriber[subListCnt];
    for (int n=0; n<subListCnt; n++)
      subs[n] = subList.getSubscriber(n);
    for (int n=0; n<subListCnt; n++) {
      Subscriber sub = subs[n];
      if (sub == null)
        continue;
      if (sub.isExpired() == true)
        removeSubscriber(sub);
    }
   
    // Notify to subscribers.
    subListCnt = subList.size();
    subs = new Subscriber[subListCnt];
    for (int n=0; n<subListCnt; n++)
      subs[n] = subList.getSubscriber(n);
    for (int n=0; n<subListCnt; n++) {
      Subscriber sub = subs[n];
      if (sub == null)
        continue;
      if (notify(sub, stateVar) == false) {
View Full Code Here

TOP

Related Classes of org.cybergarage.upnp.event.SubscriberList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.