I have a Jetty HttpClient sending Async Requests using Jetty v9.0.2. I have a Response.ContentListener that successfully buffers-up response and a Response.CompeleteListener that is called when the call has completed.
- Jetty 9.2 JavaDocs has a Request.AsyncContentListener which has a parameter to tell Jetty the content has been consumed:
- callback - the callback to call when the content is consumed.
This listener type is NOT in the Jetty v9.0.2 Response api:
- import org.eclipse.jetty.client.api.Result;
There are two questions really:
- Does the Response.ContentListener need to notify Jetty client that the content is consumed?
- If so: how is that managed with Jetty v9.0.2
- What kind of clean-up will be required using Async calls with these two Response.ContentListener and Response.CompeleteListener set-up?
- Are there potential gottchas using async with Jetty v9.0.2?
It seems to be working fine; I need to ensure we have no resource leaks or potential leaks, etc. And of course we need the program to be nice and clean so it can run 24x7. Thanks in advance for your welcome help.
note:
- Request.AsyncContentListener - Stable Jetty doc (jetty 9.2, I believe)