Hello
I am trying to implement some kind of timeout in my
java application.
I have a method which cannot be modified, because it is on an external JAR and which returns a value.
I want to call this method and, after X seconds without response from the method call, throw a TimeOutException. If the X seconds are not reached, than I want to be able of access the response of the method call.
Simple algorithm code explaining the general goal:
How can I do that?
Thanks
Regards