I have a method and it calls another method, for which the result is not important. To be exact, it is a POST request to a web service and the result is processed in that method and not in the calling method. Now I want the main method to return before that task finishes.
In essence, I need some sort of asynchronousity. What tools can I use in Java? Here are the steps again:
- Method
A
calls MethodB
- Method
B
starts executing (we are not interested in the results of method b: it makes a call to a web service and processes the results itself) - Method
A
returns before MethodB
finishes