Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Jetty HTTP client async mode

Hi everyone

I am experiencing difficulties with async jetty HTTP client api. I have a request, I setup async content listener like this

request.onResponseContentAsync { response, buffer, callback ->
    // schedule some async task then call callback.success() on completed
}

It works but I am receiving next events before the callback get notified so I can't stop events. The only solution is to block inside the handler but it doesn't look like async at all. Is there way to suspend upcoming events until callback.success() called?

Kind regards
Sergey

Back to the top