I\'m using a third party Java library to interact with a REST API. The REST API can sometimes take a long time to respond, eventually resulting in a java.net.ConnectExcept
java.net.ConnectExcept
I recommend TimeLimiter from Google Guava library.