Examples of Subscription


Examples of com.aelitis.azureus.core.subs.Subscription

    setAlignment(ALIGN_TRAIL);
  }

  public void refresh(TableCell cell) {
    int nbResults = 0;
    Subscription sub = (Subscription) cell.getDataSource();
    if (sub != null) {
      nbResults = sub.getHistory().getNumUnread() + sub.getHistory().getNumRead();
    }

    if (!cell.setSortValue(nbResults) && cell.isValid()) {
      return;
    }
View Full Code Here

Examples of com.aelitis.azureus.core.subs.Subscription

    TableCell   cell,
    long     timestamp )
  {
    timestamp = 0;
       
    Subscription sub = (Subscription) cell.getDataSource();
   
    if ( sub != null ){

      timestamp = sub.getHistory().getLastScanTime();
    }

    if (!cell.setSortValue(timestamp) && cell.isValid()) {
      return;
    }
View Full Code Here

Examples of com.aelitis.azureus.core.subs.Subscription

    setMaxWidth(100);
  }

  public void refresh(TableCell cell) {
    int nbResults = 0;
    Subscription sub = (Subscription) cell.getDataSource();
    String category = null;
    if (sub != null) {
      category = sub.getCategory();
    }
   
    if ( category == null ){
      category = "";
    }
View Full Code Here

Examples of com.aelitis.azureus.core.subs.Subscription

    setMaxWidth(100);
  }

  public void refresh(TableCell cell) {
    int nbSubsribers = 0;
    Subscription sub = (Subscription) cell.getDataSource();
    if (sub != null) {
      nbSubsribers = (int) sub.getCachedPopularity();
    }

    if (!cell.setSortValue(nbSubsribers) && cell.isValid()) {
      return;
    }
View Full Code Here

Examples of com.amazonaws.services.sns.model.Subscription

      if (endpointElement.hasAttribute("request-path")) {
        requestPath = endpointElement.getAttribute("request-path");
      } else {
        requestPath = String.format("/%s.do", channelAdapterId);
      }
      subscriptionList.add(new Subscription().withEndpoint(
          baseURI.concat(requestPath)).withProtocol(
          baseURI.startsWith("https") ? "https" : "http"));

      // register a HttpEndpoint at this path
      BeanDefinitionBuilder httpEndpointBuilder = BeanDefinitionBuilder
          .genericBeanDefinition(HttpEndpoint.class);
      String beanName = String
          .format("%s-httpEndpoint", channelAdapterId);
      parserContext.registerBeanComponent(new BeanComponentDefinition(
          httpEndpointBuilder.getBeanDefinition(), beanName,
          new String[] { requestPath }));
      snsExecutorBuilder.addPropertyReference("httpEndpoint", beanName);
    }

    // subscriptions element
    Element subscriptionsElement = DomUtils.getChildElementByTagName(
        element, "subscriptions");
    if (subscriptionsElement != null) {
      NodeList childNodes = subscriptionsElement.getChildNodes();
      for (int i = 0; i < childNodes.getLength(); i++) {
        Node child = childNodes.item(i);
        if (child.getNodeType() == Node.ELEMENT_NODE) {
          Element childElement = (Element) child;
          String localName = child.getLocalName();
          if ("http".equals(localName)) {
            String uri = childElement.getAttribute("base-uri");
            if (childElement.hasAttribute("request-path")) {
              uri = uri.concat(childElement
                  .getAttribute("request-path"));
            }
            subscriptionList.add(new Subscription().withEndpoint(
                uri).withProtocol(
                uri.startsWith("https") ? "https" : "http"));

          } else if ("sqs".equals(localName)) {
            String queueArn = null;
            if (childElement.hasAttribute("queue-arn")) {
              queueArn = childElement.getAttribute("queue-arn");
            }
            String queueId = null;
            if (childElement.hasAttribute("queue-id")) {
              queueId = childElement.getAttribute("queue-id");
            }
            Assert.state(queueArn != null || queueId != null,
                "One of 'queue-arn' or 'queue-id' needs to be defined");
            if (queueId != null) {
              String sqsBeanName = SqsParserUtils
                  .getExecutorBeanName(queueId);
              snsExecutorBuilder.addDependsOn(sqsBeanName);
              sqsExecutorMap.put(queueId,
                  new RuntimeBeanReference(sqsBeanName));
              subscriptionList.add(new Subscription()
                  .withEndpoint(queueId).withProtocol("sqs"));

            } else {
              subscriptionList
                  .add(new Subscription().withEndpoint(
                      queueArn).withProtocol("sqs"));
            }
          }
        }
      }
View Full Code Here

Examples of com.barchart.feed.base.sub.Subscription

      final Set<String> interests) {

    final Set<Subscription> newSubs = new HashSet<Subscription>();

    for (final String interest : interests) {
      final Subscription sub = subscribe(agent, interest);
      if (!sub.isNull()) {
        newSubs.add(sub);
      }
    }

    return newSubs;
View Full Code Here

Examples of com.betfair.cougar.core.api.ev.Subscription

            nioLogger.log(NioLogger.LoggingLevel.TRANSPORT, currentSession, "Couldn't find heap definition, heapId = %s", newHeapSubscription.getHeapId());
            logger.log(Level.WARNING, "Can't find the heap for this subscription result. Heap id = " + newHeapSubscription.getHeapId());
            observer.onResult(new ExecutionResult(new CougarServiceException(ServerFaultCode.FrameworkError, "Can't find the heap for this subscription result. Heap id = " + newHeapSubscription.getHeapId())));
        } else {
            if (preExistingHeap && heapState.haveSeenInitialUpdate()) {
                Subscription sub = heapState.addSubscription(this, currentSession, newHeapSubscription.getHeapId(), newHeapSubscription.getSubscriptionId());
                if (sub != null) {
                    observer.onResult(new ExecutionResult(new ConnectedResponseImpl(heapState.getHeap(), sub)));
                } else {
                    // null sub means we already had a subscription with that id, something's not in a good state in the server, so kill this connection as we don't know what's going on
                    nioLogger.log(NioLogger.LoggingLevel.TRANSPORT, currentSession, "Duplicate subscription returned by the server, id = %s - closing session", newHeapSubscription.getSubscriptionId());
View Full Code Here

Examples of com.bloomberglp.blpapi.Subscription

    Map<String, Object> returnValue = Maps.newHashMap();
   
    SubscriptionList sl = new SubscriptionList();
    for (String bbgUniqueId : bbgUniqueIds) {
      String securityDes = getBloombergSubscriptionPathPrefix() + bbgUniqueId;
      Subscription subscription = new Subscription(securityDes, BloombergDataUtils.STANDARD_FIELDS_LIST);
      sl.add(subscription);
      returnValue.put(bbgUniqueId, subscription);
    }
   
    try {
View Full Code Here

Examples of com.commafeed.frontend.model.Subscription

    for (FeedSubscription subscription : subscriptions) {
      if ((id == null && subscription.getCategory() == null)
          || (subscription.getCategory() != null && Objects.equals(subscription.getCategory().getId(), id))) {
        UnreadCount uc = unreadCount.get(subscription.getId());
        Subscription sub = Subscription.build(subscription, config.getApplicationSettings().getPublicUrl(), uc);
        category.getFeeds().add(sub);
      }
    }
    Collections.sort(category.getFeeds(), new Comparator<Subscription>() {
      @Override
View Full Code Here

Examples of com.google.api.services.youtube.model.Subscription

            snippet.setResourceId(resourceId);

            // Create a request to add the subscription and send the request.
            // The request identifies subscription metadata to insert as well
            // as information that the API server should return in its response.
            Subscription subscription = new Subscription();
            subscription.setSnippet(snippet);
            YouTube.Subscriptions.Insert subscriptionInsert =
                    youtube.subscriptions().insert("snippet,contentDetails", subscription);
            Subscription returnedSubscription = subscriptionInsert.execute();

            // Print information from the API response.
            System.out.println("\n================== Returned Subscription ==================\n");
            System.out.println("  - Id: " + returnedSubscription.getId());
            System.out.println("  - Title: " + returnedSubscription.getSnippet().getTitle());

        } catch (GoogleJsonResponseException e) {
            System.err.println("GoogleJsonResponseException code: " + e.getDetails().getCode() + " : "
                    + e.getDetails().getMessage());
            e.printStackTrace();
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.