Responding at arbitrary timing with Jersey on Grizzly using Timer.schedule
all. Thanks in advance.
I am creating a RESTful service with Jersey on 开发者_高级运维Grizzly. In the service, I would like to wait responding to a request for several seconds using "Timer.schedule", instead of using "Thread.sleep", which is a blocking operation.
However, "return" seems to be an only way to respond a request in Jersey. So, I have not figured out the way to do this. If you have any idea doing this, would you please advice me how to do this?
I am using Jersey-1.4 and Grizzly-1.9.32, without Maven.
Thank you very much. Best regards.Take a look at this question, it may be of help to you.
精彩评论