Subscribe to RSS feed

I can read an RSS once given grab (see example below). However, I would like to be notified when the data changes. Can I add a kind of listening port to the urlconnection?

String symbol = "VOD.L";
        try {             
             URL yahoofin = new URL("http://finance.yahoo.com/d/quotes.csv?s=" + symbol + "&f=sl1d1t1c1ohgv&e=.csv");             
             
             URLConnection yc = yahoofin.openConnection();  
             BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));     
             String inputLine;             
             while ((inputLine = in.readLine()) != null) {                 
                  String[] yahooStockInfo = inputLine.split(",");                               
                  String name = yahooStockInfo[0].replaceAll("\"", "");                 
                  float price = Float.valueOf(yahooStockInfo[1]);                 
                System.out.println(name+ " - "+price);
                            
             }             
             in.close();   
         } catch (Exception ex) {             
              System.out.println("Unable to get stockinfo for: " + symbol + ex);         
         } 
If it is not possible, the only work around I can think of is periodically say 5/10 seconds run the code below. However, this seems very wastefull if the price does not change for an hour for example.

Published by: 847102 on November 29, 2011 07:25

There is no such thing as keeping a permanent connection through which you will receive notifications in HTTP. At least, no common way which is part of any specification RSS. Voting is the way to go. This is what the RSS readers.

Tags: Java

Similar Questions

  • How can I remove the 'Subscribe now' button and the topic when you see an RSS feed?

    How can I remove the 'Subscribe now' button and the topic when you see an RSS feed?

    It is a yellow box that appears at the top of the page. It has options to subscribe to the RSS feed displayed.

    How can I remove this whole box to display?

    Thank you
    ~ Michel

    Make sure that the userContent.css file is a CSS (cascading style sheet) file and is not a hidden .txt file extension.

    You can use this button to go to the Firefox profile folder:

    • Help > troubleshooting information > profile directory: see file
  • Why can't subscribe me to RSS feeds with RC2?

    I can't do crap with RSS feeds since installing 4.0 RC2. Live Bookmarks button "subscribe to this Web page...". "does nothing but to refresh the page. Clicking on a link to the workflow does nothing, and RSS reader addons will not find all the food even if I manually save to a folder of bookmarks. I got NewsFox installed before that is now outdated I thought might have screwed up things, but since removing, I always have the same question.

    Try reinstalling your Firefox

  • Trying to subscribe to the RSS feed to know LightRooom

    First of all I new straight down to the RSS and Lightroom.  I'm trying to sign up for the LEARN LIGHT ROOM rss @ feed://rssfeeds.tv.adobe.com/learn-lightroom-5.xml

    When I do... everything happens in Japanese.  All the others that I've been subscribing are fine.  Is there something I can do to get the thing in English?

    Thank you

    Norm

    Hey Norm,

    The inner workings of the RSS file is in English, perhaps remove the subscription and try again? I installed it via

    http://RSSFeeds.TV.Adobe.com/learn-Lightroom-5.XML

    and it happens in English.

    Edit: I tried some different readers, and one of them is launched in Japanese.

    Best,

    Sean

  • How to change the RSS feed without losing subscribers

    I am currently using blubrry to download my podcasts. I'm not the host through them, but rather on my own site and using my feed to send to iTunes (http://racingdudes.com/feed/podcast/). However, I spent to SoundCloud to start my hosting podcasts. I added my last three episodes of the podcast on SoundCloud and they integrated into my website. However, how can I change the RSS feed of my original stream to my new SoundCloud feed without losing all my subscribers and sides?

    My first thought was to connect to iTunes Connect and my current RSS is such a list, swap out for my new. Which will work? Is it that simple? It seems that I read many ways outdated, complicated to do this process just make sure, if this is the newest, easiest way?

    Appreciate your help. Thank you!

    In order to keep your subscribers, you must either add the "itunes: new-feed-url' to the original feed, or launch a redirect 301 on your server: ideally both." These will change to the new food store and also your subscribers will be transparently redirected - they won't even notice. The complete method is explained in detail here: http://wilmut.uk/move

    If you are unable to change the power supply and also cannot implement a 301 redirect, then using Podcasts Connect will redirect the store but not subscribers redirect. In this case, the only option is to include an announcement in the last podcast on old food (you could do a special episode) announcing the change and ask people to re-subscribe from the shop page.

  • How to cancel selection application RSS feed button?

    I checked the box that says use the application chosen for each RSS feed subscription. Unfortunately, the new version of Mail (Yosemite) does not FEED THAT like the previous version. now, I get an error message whenever I try to subscribe. How can I solve this problem. Thank you very much

    You can read the article of Web feeds in Firefox > Preferences > Applications

  • How to manually add an RSS feed?

    I remember live bookmarks can add them with an icon, but if anything that I can get the stream url?

    Try this variant as a bookmarklet.

    javascript:(function(){function hEsc(s){return(s.replace(/&|<|>/g,function(r){return(r=='&'?'%26amp;':r=='>'?'%26gt;':r=='<'?'%26lt;':'')}))}function lEsc(s){return(s.replace(/&/g,'%26amp;').replace(/"/,'%26quote;'))}t=hEsc(document.title);h='<link rel="alternate" type="application/rss+xml" title="'+t+'" href="'+lEsc(location.href)+'" />';with(window.open().document){write('<html><head>'+h+'</head><body>Click the highlighted RSS feed icon</body></html>');close();}})();
    1. Make sure you have the "Subscribe to this page" icon on the Navigation toolbar
    2. create a new bookmark (AddFeed in the bookmarks toolbar) with the location defined in the complete JavaScript code
    3. Open the page with the content of food in a tab
    4. invoke the bookmark with JavaScript code
    5. This should open a new tab/window with toolbar button subscribe activated (highlighted)
    6. Click the button to subscribe to open the power page
  • In support, forum, signed in, where can I associate with the questions I ask myself? Years back, could get the RSS feed for the question. Always available?

    Where can I associate with my questions about my account? The search for user name does not work. A few years back, you could subscribe to an RSS feed for a question, yours or others. Is - this past, if so, why? How can you save the question, without saving your question text in a document and copy and paste into search? Version of FF 19.0.2.

    Thank you.

    Your messages will now appear in your profile: https://support.mozilla.org/en-US/user/225440

    You can also use the old method of "My Contributions" link: https://support.mozilla.org/questions?filter=my-contributions

    Is that it?

  • On old laptop, I got a type of analysis with RSS feeds toolbar. Now have 18.0.2 and do not get to see what is later, all the time. How can I get RSS analysis?

    Is available or not for RSS bar analysis? He was a favorite of mine feature to stay connected without having to open a site on news or click on anything other than the title that interested me. If the analysis is no longer available, is there a page in order to get similar things to the old RSS feeds? Can it be done through FaceBook?

    The only RSS feature in Firefox's live bookmarks.

    For a news ticker, you've probably used an add-on like HeadlinesTicker.

    As far as I know, this is the only news ticker Add on available (another one, NewsBar seems to be obsolete and non-functional in the latest version of Firefox). However, there are several other RSS reader modules that display news in formats other than a news ticker.

    You can also subscribe to feeds through web sites as follows.

  • How can I set up an RSS feed in Firefox 8.0?

    In older versions of Firefox, it was easy to set up an RSS feed. But I can't understand how do with Firefox 8.0.

    Hey johncali,

    All you have to do is click on the RSS button for the feed or click on the link directly. Firefox will understand that it is an RSS feed and asking you if you want to subscribe. Nice and easy!

  • I have post Podcast RSS feeds the posts back to subscribers, but NOT in the iTunes store... why?

    I have an account for my Podcast. I publish the RSS and posts go to the each subscriber of iTunes accounts but do not publish in the iTunes store. I changed servers recently and have, in my opinion, done all correct use for my stream change... help

    Hello.

    If you choose a new workflow, you must:

    redirect subscribers to your new workflow

    notify the iTunes Store, you have a new stream.

    The two steps above are complemented by a redirect:

    Set up a 301 redirect on your server for your old power supply.

    Add the itunes: new-feed-url tag to your old feed. Example: http://example.com/new-rss-feed.xml

    Know how to do that in the section "Change your RSS Podcast Feed URL" here: http://www.apple.com/itunes/podcasts/specs.html

    Please share:

    The old RSS feed

    The new RSS feed

    URL of your iTunes.

    It seems that this has happened:

    First RSS feed-> Submitted to iTunes > user subscribed--> user gets new episodes

    Second RSS feed-->? iTunes has been notified? --> iTunes doesn't new episodes.

    Second RSS feed--> users get new episodes

    I recommend the deletion of your podcasts in the box my Podcasts in iTunes Desktop (to avoid confusion).

    Then, search the iTunes Store for the podcast put you to the test and you subscribe.

    In my Podcasts, click on the podcast > copy the link.

    Is this link, your NEW diet or your old diet?

    -Fan

  • Unwanted Alerts/RSS feeds in Windows Live when you're connected

    the boss of my result of search behavior online in me being automatically subscribed to the RSS feed in Windows cannot live without knowing me and it could also be nothing to do with the browser settings

    Hello

    Given that the problem is related to Windows live, I suggest you post the question in the forums and check them off below if it helps:
    http://windowslivehelp.com/solutions.aspx?ProductID=1

    It will be useful.

  • How to stop RSS feeds

    Could someone tell me how to stop the RSS feeds on win live mail?  I tried to simply remove the folder nothing helps. Thank you

    WLMail will retrieve the RSS feeds to which you subscribe in Internet
    Solution Explorer.
    To stop them, open IE8, click Favorites - RSS
    Right-click on a feed, and then select Remove
    or right click and select properties to change the settings
     
    --
    Dave N.
    MS - MVP (Mail)
    Windows 7 Ultimate 64
    "chet burke" wrote in message
    News: * e-mail address is removed from the privacy... *
     
    I know how to remove them I wanted them to stop entering my computer
     
     

    Windows 7 Ultimate 64

  • Problem with bingaerialeurope theme, I wonder not «subscribe to RSS»

    I recently had a problem with the theme of Europe bingaerial.

    It has been installed, but the flow has stopped updating

    I tried to remove and reinstall but I am not asked "subscribe to RSS", and no images are uploaded.

    I can download versions of bingaerial

    Hello

    I suggest to follow the steps provided and check if it helps.

    a. run Internet Explorer and then press ALT + C or Open Favorites Center & switch to the Feeds tab and remove the following feed

    http://themeserver.microsoft.com/default.aspx?p=Bing&c=Desktop&m=en-US
    

    b. open personalization (right click on desktop and choose personalize) and shuffle or re - select the Bing Dynamic theme.

    c. He invite you to subscribe flow RSS of Bing and to download attachments to automatically rotate wallpapers or download unique wallpaper for your desktop. Click download attachments

    • Now theme will begin downloading wallpapers automatically.

    Hope this information is helpful

  • Problem with Knowledge Base detailed RSS feed

    Hello

    I've subscribed to the Feed detailed Knowledge Base via http://feeds.feedburner.com/vmwarekbfeed.

    Because the power source has moved around Jan, 14 I get the same items over and over again, every day.

    Statistics of Google Reader for the last 30 days, there are 309 new article / per week which is a lot more than before.

    Is it a problem with the power supply itself or with the tag "updated date" items change all the time?

    Any help is appreciated!

    See you soon,.

    Vincent.

    Sorry for all the problems with the RSS feed. We look for ways to solve this problem, as the diff鲥ntes involved pieces do not play well together.

    Here are some alternatives for you that you may want to consider:

    1. KB Digest is published every Monday with a list of all the new articles from the previous week.  The correct URL for RSS feed of this blog is here. The RSS feed of this blog works, we are committed
    2. If you're on Twitter, follow @VMwareCares. This account tweets per day for each new KB article.

Maybe you are looking for

  • iTunes library didn't give all of my music library

    Small question. I recently moved my iTunes library from PC to Mac and unfortunately has no transfer via. That would be partly because I didn't have enough available storage cloud? If so, is that I could buy more storage and transfer? Thank you Nate

  • SimpleGatewayService

    After the installation of El Capitan, this pop-up continues. It cannot be permanently closed. 'More info' or 'ok' is clicked, it continues to occur. And, it blocks the ability to type on the keyboard. How to go far, far away?

  • BIOS directory not found error message - update BIOS T430s

    I recently bought a T430s (Type: 2352CTO) and thought I should try to update the BIOS to version 1.11 to 1.16. I have downloaded g1uj07uc.iso and burned the CD in the BIOS. After you restart the computer with the CD, I get an error message: The BIOS

  • How can I get Windows Defender updated?

    On checking my safety, I get message that my Windoew Defender is DISABLED, expired.  When I TRY TO update, I get the same message.  Anyone have the answer for me? I'd appreciate your comments.  Thank you.

  • PowerConnect 7048 Port Mirroring

    Hello everyone, I'm trying to mirror two ports on my 7048 Powerconnect switch. One of them is a Trunk Port, and the other is just a port not marked. I don't see any incoming traffic on port of destination. Is it possible a bug in the Web management i