com.heroku.api.connection.AsyncConnection Maven / Gradle / Ivy
package com.heroku.api.connection;
import com.heroku.api.request.Request;
import java.util.Map;
/**
* Asynchronous version of Connection
*
* @param the type of 'Future' that this connection will return
*/
public interface AsyncConnection extends Connection {
/**
* Asynchronously execute the given request with, using a different apiKey than the one associated with this connection
*
* @param request The request to execute
* @param apiKey API key for Heroku
* @param The Type of the Response when parsed by the request, returned by the Future
* @return A future Response
*/
F executeAsync(Request request, String apiKey);
/**
* Asynchronously execute the given request with, using a different apiKey than the one associated with this connection
*
* @param request The request to execute
* @param apiKey API key for Heroku
* @param The Type of the Response when parsed by the request, returned by the Future
* @param extraHeaders any extra headers to send with the request
* @return A future Response
*/
F executeAsync(Request request, Map extraHeaders, String apiKey);
}