Package org.cipango.kaleo.event

Examples of org.cipango.kaleo.event.Subscription.addListener()


        subscription = presentity.removeSubscription(session.getId());
       
        if (subscription == null)
        {
          subscription = new Subscription(presentity, session, -1, subscriberUri);
          subscription.addListener(_watcherInfo.getSubscriptionListener());
        }
        else
        {
          subscription.setExpirationTime(System.currentTimeMillis());
          if (_log.isDebugEnabled())
View Full Code Here


        subscription = presentity.getSubscription(session.getId());
   
        if (subscription == null)
        {
          subscription = new Subscription(presentity, session, now + expires*1000, subscriberUri);
          subscription.addListener(_watcherInfo.getSubscriptionListener());
          presentity.addSubscription(subscription);
         
          switch (subHandling)
          {
          case ALLOW:
View Full Code Here

    assertEquals(AOR, watcherList.getResource());
    assertEquals(PresenceEventPackage.NAME, watcherList.getPackage());
    assertEquals(0, watcherList.getWatcherArray().length);
   
    Subscription subscription = new Subscription(presentity, null, 100, SUBSCRIBER_AOR);
    subscription.addListener(resource);
    subscription.setState(Subscription.State.PENDING, Reason.SUBSCRIBE);
    //System.out.println(resource.getState().getContent());
    assertEquals(1, eventListener._nbNotif);
   
    subscription.setState(Subscription.State.ACTIVE, Reason.APPROVED);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.