Hi Denis,
> My question is about grizzly-http-webserver 1.9. Currently I work on
> the highload web-service. I want to make asynchronouse http calls. As
> a http-client I chosen the com.ning async-http-client. Can I do the
> current thread be yielded after the async call and the request
> processing be finished after getting http response?
Sure, you have to use response.suspend/resume methods.
Schematically it will look following:
/*response.suspend(...)*
asyncHttpClient.execute(myHttpRequest, new MyCompletionHandler() {
public void onComplete() {
*response.resume()*;
}
}/
You may want to use Grizzly 2.0, where we have also implemented NIO
streams, so your impl. wouldn't block on read or write.
Here you can find more docs:
http://grizzly.java.net/nonav/docs/docbkx2.0/html/hsf-suspend-resume.html
http://grizzly.java.net/nonav/docs/docbkx2.0/html/hsf-nio-streams.html
Thanks.
WBR,
Alexey.