@Override public SyndFeed retrieveFeed(URL feedUrl) throws IOException, FeedException, com.rometools.fetcher.FetcherException { Assert.notNull(feedUrl, "feedUrl must not be null"); URLConnection connection = feedUrl.openConnection(); com.rometools.fetcher.impl.SyndFeedInfo syndFeedInfo = new com.rometools.fetcher.impl.SyndFeedInfo(); this.refreshFeedInfo(feedUrl, syndFeedInfo, connection); return syndFeedInfo.getSyndFeed(); }
syndFeedInfo = new SyndFeedInfo(); retrieveAndCacheFeed(feedUrl, syndFeedInfo, httpConnection); } else {
public void callback(final String callbackPath, final SyndFeed feed) { if (!callbackPath.startsWith(callbackPrefix)) { throw new HttpStatusCodeException(404, "Not a valid callback prefix.", new Exception(callbackPath + " doesnt start with " + callbackPrefix)); } final String id = callbackPath.substring(callbackPrefix.length()); LOG.debug("Got callback for {}", id); final Subscription s = dao.findById(id); if (s == null) { throw new HttpStatusCodeException(404, "Not a valid callback.", null); } validateLink(feed, s.getSourceUrl()); SyndFeedInfo info = null; URL url = null; try { url = new URL(s.getSourceUrl()); info = cache.getFeedInfo(url); } catch (final MalformedURLException ex) { LOG.error("Malformed URL", ex); } if (info == null) { info = new SyndFeedInfo(); info.setId(s.getId()); info.setUrl(url); } info.setLastModified(System.currentTimeMillis()); info.setSyndFeed(feed); cache.setFeedInfo(url, info); s.getCallback().onNotify(s, info); }
public void callback(final String callbackPath, final SyndFeed feed) { if (!callbackPath.startsWith(callbackPrefix)) { throw new HttpStatusCodeException(404, "Not a valid callback prefix.", new Exception(callbackPath + " doesnt start with " + callbackPrefix)); } final String id = callbackPath.substring(callbackPrefix.length()); LOG.debug("Got callback for {}", id); final Subscription s = dao.findById(id); if (s == null) { throw new HttpStatusCodeException(404, "Not a valid callback.", null); } validateLink(feed, s.getSourceUrl()); SyndFeedInfo info = null; URL url = null; try { url = new URL(s.getSourceUrl()); info = cache.getFeedInfo(url); } catch (final MalformedURLException ex) { LOG.error("Malformed URL", ex); } if (info == null) { info = new SyndFeedInfo(); info.setId(s.getId()); info.setUrl(url); } info.setLastModified(System.currentTimeMillis()); info.setSyndFeed(feed); cache.setFeedInfo(url, info); s.getCallback().onNotify(s, info); }
syndFeedInfo = new SyndFeedInfo(); retrieveAndCacheFeed(feedUrl, syndFeedInfo, httpConnection); } else {
syndFeedInfo = new SyndFeedInfo();