title: Alternative to polling server to fetch data in Java client?
body: <p>My Java application needs to fetch data from server (running CakePHP on nginx). Is there an alternative way to fetch data without polling server? Currently I am making use of persistent HTTP connection and polling server every X seconds to see if any data is available. </p>
  
  <p>Had it been a web browser, I could have used web sockets. What options do we have in Java?</p>