Examples of Subscription


Examples of com.google.appengine.api.prospectivesearch.Subscription

        service.subscribe(TOPIC, "mySubscription", 0, "title:hello", createSchema("title", FieldType.STRING));
        service.subscribe(TOPIC, "mySubscription", 0, "body:foo", createSchema("body", FieldType.STRING));

        assertEquals(1, service.listSubscriptions(TOPIC).size());

        Subscription subscription = service.getSubscription(TOPIC, "mySubscription");
        assertEquals("body:foo", subscription.getQuery());
    }
View Full Code Here

Examples of com.google.appengine.api.xmpp.Subscription

        log.info("SubscriptionServlet: ..." + req.getPathInfo());

        DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
        XMPPService xmpp = XMPPServiceFactory.getXMPPService();

        Subscription sub = xmpp.parseSubscription(req);
        JID userJID = sub.getFromJid();
        Entity userEntity = MainPageServlet.getUserEntity(userJID);

        if (sub.getSubscriptionType() == SubscriptionType.SUBSCRIBED) {
            userEntity.setProperty("accepted_invitation", true);
        } else if (sub.getSubscriptionType() == SubscriptionType.UNSUBSCRIBED) {
            userEntity.setProperty("accepted_invitation", false);
        } else if (sub.getSubscriptionType() == SubscriptionType.SUBSCRIBE) {
            userEntity.setProperty("is_subscribed", true);
        } else if (sub.getSubscriptionType() == SubscriptionType.UNSUBSCRIBE) {
            userEntity.setProperty("is_subscribed", false);
        }
        datastore.put(userEntity);
    }
View Full Code Here

Examples of com.google.code.lightssh.project.message.entity.Subscription

        || StringUtils.isEmpty(param.getCatalog().getId())
        || param.getRecType() == null
        || StringUtils.isEmpty(param.getRecValue())  )
      return false;
   
    Subscription exists = get( param.getCatalog().getId()
        ,param.getRecType(),param.getRecValue());
 
    return exists == null || exists.getIdentity().equals(param.getIdentity() );
  }
View Full Code Here

Examples of com.opengamma.livedata.server.Subscription

    MapLastKnownValueStoreProvider lkvStoreProvider = new MapLastKnownValueStoreProvider();
    return new MarketDataDistributor(new DistributionSpecification(
        ExternalId.of("RIC", "AAPL.O"),
        StandardRules.getNoNormalization(),
        "LiveData.Bloomberg.Equity.AAPL"),
        new Subscription("", factory, lkvStoreProvider),
        factory,
        false,
        lkvStoreProvider);
  }
View Full Code Here

Examples of com.seyren.core.domain.Subscription

        this.notificationServices = notificationServices;
    }
   
    @Override
    public Response createSubscription(String checkId, Subscription subscription) {
        Subscription stored = subscriptionsStore.createSubscription(checkId, subscription);
        return Response.created(uri(checkId, stored.getId())).build();
    }
View Full Code Here

Examples of com.stripe.model.Subscription

  public void testUpdateSubscription() throws StripeException {
    Plan plan = Plan.create(getUniquePlanParams());
    Customer customer = Customer.create(defaultCustomerParams);
    Map<String, Object> subscriptionParams = new HashMap<String, Object>();
    subscriptionParams.put("plan", plan.getId());
    Subscription sub = customer.updateSubscription(subscriptionParams);
    assertEquals(sub.getPlan().getId(), plan.getId());
    assertEquals(sub.getCustomer(), customer.getId());
  }
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.core.Subscription

   
                v = new Vector();
   
                Iterator itr = s.iterator();
                while (itr.hasNext()) {
                    Subscription sub = (Subscription)itr.next();
                    DurableInfo di = new DurableInfo();
                    di.name = sub.getDurableName();
                    di.clientID = sub.getClientID();
                    di.isActive = sub.isActive();
                    di.activeCount = sub.getActiveSubscriberCnt();
                    di.isShared = sub.getShared();
                    di.nMessages = sub.numInProcessMsgs();
                    di.consumer = new ConsumerInfo();
                    //Ok, I'm not setting id because it really should be an int, maybe later
                    di.consumer.destination = sub.getDestinationUID().getName();
                    di.consumer.type = DestType.DEST_TYPE_TOPIC;
                    di.consumer.selector = sub.getSelectorStr();
                    // not bothering with the connection this time either
                    di.consumer.connection = null;
                   
                    v.add(di);
                }
View Full Code Here

Examples of jnode.dto.Subscription

        ret.setGroup((link != null) ? getOptionString(link,
            LinkOption.SARRAY_LINK_GROUPS).split(" ")[0] : "");
        logger.l3("Echoarea " + name.toUpperCase() + " created");
        ORMManager.get(Echoarea.class).save(ret);
        if (link != null) {
          Subscription sub = new Subscription();
          sub.setArea(ret);
          sub.setLink(link);
          ORMManager.get(Subscription.class).save(sub);
        }
        Notifier.INSTANSE.notify(new NewEchoareaEvent(name, link));
      }
    } else {
View Full Code Here

Examples of jp.co.ntt.oss.data.Subscription

    UserTransaction utx = null;
    boolean updated = false;
    boolean detached = false;

    try {
      Subscription subs = null;
      Subscriber suber = null;

      // get replica server connection
      replicaDB = new DatabaseResource(server);
      replicaConn = replicaDB.getConnection();

      // begin transaction
      utx = replicaDB.getUserTransaction();
      utx.begin();

      // get subscription data
      subs = SyncDatabaseDAO.getSubscription(replicaConn, schema, table);

      if (subs.getSubsID() != Subscription.NOT_HAVE_SUBSCRIBER) {
        // get master server connection
        try {
          masterDB = new DatabaseResource(subs.getSrvname());
          masterConn = masterDB.getConnection();
        } catch (Exception e) {
          if (!force) {
            throw e;
          }

          log.warn(e.getMessage());
        }
      }

      // unsubscribe replica
      SyncDatabaseDAO.unSubscribeObserver(replicaConn, schema, table);

      if (masterConn != null) {
        if (force) {
          utx.commit();
          updated = true;
          utx.begin();
        }

        // get subscriber data
        suber = SyncDatabaseDAO.getSubscriber(masterConn, subs
            .getSubsID());

        if (suber.getNspName() == null || suber.getRelName() == null) {
          log.warn(mProperty.getMessage("error.master.dropped", suber
              .getSubsID()));
View Full Code Here

Examples of lupos.event.pubsub.Subscription

        send = new SlidingWindow();
      }

      send.init();

      subscribe(new Subscription("#" + this.subcount++ + " " + name,
          query), new PageAction(name, htmlCode, send));

    }

    if (selectedSendOption.equals("Generate HTML")) {
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.