![JAR search and dependency download from the Maven repository](/logo.png)
io.femo.http.drivers.AsynchronousExecutorHttpRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http-jdk7 Show documentation
Show all versions of http-jdk7 Show documentation
An easy to use HTTP API, that supports synchronous and asynchronous execution of HTTP request.
On android only asynchronous driver is supported.
This library has been backported to jdk 7 to retain compatibility with android!
The newest version!
package io.femo.http.drivers;
import io.femo.http.HttpRequest;
import io.femo.http.HttpResponseCallback;
import java.net.URL;
import java.util.concurrent.ExecutorService;
/**
* Created by felix on 2/9/16.
*/
public class AsynchronousExecutorHttpRequest extends AsynchronousHttpRequest {
private ExecutorService executorService;
public AsynchronousExecutorHttpRequest(URL url, ExecutorService executorService) {
super(url);
this.executorService = executorService;
}
@Override
public HttpRequest execute(HttpResponseCallback callback) {
executorService.submit(getRunnable(callback));
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy