开发者

Responding at arbitrary timing with Jersey on Grizzly using Timer.schedule

开发者 https://www.devze.com 2023-02-12 22:23 出处:网络
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\

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消