I have a web server using RESTful jersey, it works but I need to server-push sometimes. How can server push in jersey with Java?
Asked
Active
Viewed 3,364 times
0
-
http://stackoverflow.com/questions/22761909/restful-webservice-with-jersey-in-java-and-observer-pattern/22762245#22762245 – Santosh Mar 31 '14 at 13:02
2 Answers
0
You could use websockets on your web server to push data to the client.
-
2Client is not a browser, an android application, could you give any advice to start? – user1648447 Sep 05 '12 at 11:06
0
Have a look at Atmosphere/Jersey bidirectional conversation . REST is meant to be stateless so I'm not sure that Jersey is the right vehicle for streaming data from the server to the client. Perhaps just regular comet would suffice, running in the same container as your Jersey application: http://tomcat.apache.org/tomcat-7.0-doc/aio.html ?