curl multiget in Java
We are using URLConnection in java for for sending and receiving responses to a webservice. For a particular use case we need to be able to send concurrent non-blocking requests to the same web-service. I like the curl multi-get way of doing this, since it uses the OS (standard POSIX features) to do this.
The ideas was to start with something like this.
http://curl.haxx.se/libcurl/c/m开发者_如何学JAVAulti-post.html
Is there a way to do this in Java? I know that we can use a ThreadPoolExecutor/Threads etc.. but I prefer a curl multi-get like solution.
There is no way to do this in Java.
Mainly because Java is system independent and therefore cannot assume to have a POSIX compatible OS at hand.
Threads are the best way to implement this in Java.
精彩评论