Skip to content

Preserve interfaces of AsyncHandlers #1315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 30, 2016
Merged

Preserve interfaces of AsyncHandlers #1315

merged 6 commits into from
Nov 30, 2016

Conversation

markus-s24
Copy link

Use dynamic proxies to wrap AsyncHandlers so that all their interfaces
are preserved.

Use dynamic proxies to wrap AsyncHandlers so that all their interfaces
are preserved.
@slandelle
Copy link
Contributor

@markus-s24 Looking great, thanks! Still, project no longer compiles as RateLimitedThrottleRequestFilter in guava module also uses the code you removed. Could you please make wrap a public static factory?

@slandelle
Copy link
Contributor

@markus-s24 Have you run the test suite locally? CI has been stalled for 40 minutes while it usually takes ~7, so I suspect there's something broken.

@slandelle
Copy link
Contributor

CI stalled with tons of exceptions such as:

2016-11-29 10:07:00,856 [main] DEBUG org.asynchttpclient.AsyncCompletionHandler - com.sun.proxy.$Proxy14 cannot be cast to org.asynchttpclient.AsyncHandler
java.lang.ClassCastException: com.sun.proxy.$Proxy14 cannot be cast to org.asynchttpclient.AsyncHandler
	at org.asynchttpclient.filter.ReleasePermitOnComplete.wrap(ReleasePermitOnComplete.java:23)
	at org.asynchttpclient.filter.ThrottleRequestFilter.filter(ThrottleRequestFilter.java:62)
	at org.asynchttpclient.DefaultAsyncHttpClient.preProcessRequest(DefaultAsyncHttpClient.java:232)
	at org.asynchttpclient.DefaultAsyncHttpClient.executeRequest(DefaultAsyncHttpClient.java:189)
	at org.asynchttpclient.BoundRequestBuilder.execute(BoundRequestBuilder.java:39)
	at org.asynchttpclient.filter.FilterTest.basicTest(FilterTest.java:69)

@slandelle
Copy link
Contributor

@markus-s24 Please ping once you're done

@markus-s24
Copy link
Author

markus-s24 commented Nov 29, 2016

Sorry for the delay. It should be finally fixed now.

I have ignored the tests, because they got stuck with no failure message. Maybe some timeout in the tests would be nice?

@slandelle
Copy link
Contributor

Maybe some timeout in the tests would be nice?

Well, if you can add that, it would be great! As I said, I don't use this part of the code, and I'm pretty swamped atm.

@slandelle slandelle added this to the 2.1.0 milestone Nov 30, 2016
@slandelle slandelle merged commit 3e78a04 into AsyncHttpClient:master Nov 30, 2016
@slandelle
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants