keenlabs / KeenClient-Java

Official Java client for the Keen IO API. Build analytics features directly into your Java apps.
https://keen.io/docs
MIT License
74 stars 43 forks source link

Please make timeouts configurable in the http conneciton. #10

Closed nfmelendez closed 10 years ago

nfmelendez commented 10 years ago

Please make READ_TIMEOUT and CONNECT_TIMEOUT configurable, so we can optimize the use of threads in our system.

File is: https://github.com/keenlabs/KeenClient-Java/blob/master/src/main/java/io/keen/client/java/KeenHttpRequestRunnable.java

thanks,

Geeber commented 10 years ago

FYI, the current implementation in the 2.0.0 branch should allow configuration of these properties by overriding UrlConnectionHttpHandler#openConnection. See:

https://github.com/keenlabs/KeenClient-Java/blob/2.0.0/core/src/main/java/io/keen/client/java/http/UrlConnectionHttpHandler.java

2.0.0 isn't quite ready for release yet but it should be RSN - feedback welcome!

Geeber commented 10 years ago

By the way, the 2.0 version of the SDK is in master and should allow the approach I described in my last comment. Look at:

core/src/main/java/io/keen/client/java/http/UrlConnectionHttpHandler.java