com.ingenico.connect.gateway.sdk.java.Connection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of connect-sdk-java Show documentation
Show all versions of connect-sdk-java Show documentation
SDK to communicate with the Ingenico ePayments platform using the Ingenico Connect Server API
package com.ingenico.connect.gateway.sdk.java;
import java.io.Closeable;
import java.io.IOException;
import java.net.URI;
import java.util.List;
import com.ingenico.connect.gateway.sdk.java.logging.LoggingCapable;
/**
* Represents a connection to the Ingenico ePayments platform server. Thread-safe.
*/
public interface Connection extends Closeable, LoggingCapable {
/**
* Releases any system resources associated with this object.
* Should be called when this object is about to go out of scope.
*/
@Override
void close() throws IOException;
/**
* Send a GET request to the Ingenico ePayments platform and return the response.
*
* @param uri The URI to call, including any necessary query parameters.
* @param requestHeaders An optional list of request headers.
* @throws CommunicationException when an exception occurred communicating with the Ingenico ePayments platform
*/
Response get(URI uri, List requestHeaders);
/**
* Send a DELETE request to the Ingenico ePayments platform and return the response.
*
* @param uri The URI to call, including any necessary query parameters.
* @param requestHeaders An optional list of request headers.
* @throws CommunicationException when an exception occurred communicating with the Ingenico ePayments platform
*/
Response delete(URI uri, List requestHeaders);
/**
* Send a POST request to the Ingenico ePayments platform and return the response.
*
* @param uri The URI to call, including any necessary query parameters.
* @param requestHeaders An optional list of request headers.
* @param body The optional body to send.
* @throws CommunicationException when an exception occurred communicating with the Ingenico ePayments platform
*/
Response post(URI uri, List requestHeaders, String body);
/**
* Send a PUT request to the Ingenico ePayments platform and return the response.
*
* @param uri The URI to call, including any necessary query parameters.
* @param requestHeaders An optional list of request headers.
* @param body The optional body to send.
* @throws CommunicationException when an exception occurred communicating with the Ingenico ePayments platform
*/
Response put(URI uri, List requestHeaders, String body);
}