org.fax4j.spi.http.HTTPClient Maven / Gradle / Ivy
package org.fax4j.spi.http;
import org.fax4j.FaxJob;
import org.fax4j.common.ProviderImplementation;
import org.fax4j.spi.FaxClientSpi;
/**
* This interface defines the HTTP client used to submit HTTP requests.
*
* @author Sagie Gur-Ari
* @version 1.01
* @since 0.1
*/
public interface HTTPClient extends ProviderImplementation
{
/**
* This function creates the HTTP client configuration to be
* used later on by this HTTP client type.
*
* @param faxClientSpi
* The fax client SPI
* @return The HTTP client configuration
*/
public HTTPClientConfiguration createHTTPClientConfiguration(FaxClientSpi faxClientSpi);
/**
* Submits the HTTP request and returns the HTTP response.
*
* @param faxClientSpi
* The fax client SPI
* @param faxJob
* The fax job object
* @param httpRequest
* The HTTP request to send
* @param httpClientConfiguration
* HTTP client configuration
* @return The HTTP response
*/
public HTTPResponse submitHTTPRequest(FaxClientSpi faxClientSpi,FaxJob faxJob,HTTPRequest httpRequest,HTTPClientConfiguration httpClientConfiguration);
}