0

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?

user1648447
  • 1
  • 1
  • 1
  • http://stackoverflow.com/questions/22761909/restful-webservice-with-jersey-in-java-and-observer-pattern/22762245#22762245 – Santosh Mar 31 '14 at 13:02

2 Answers2

0

You could use websockets on your web server to push data to the client.

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 ?

Community
  • 1
  • 1
condit
  • 10,852
  • 2
  • 41
  • 60