All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ingenico.direct.Communicator Maven / Gradle / Ivy

package com.ingenico.direct;

import java.io.Closeable;
import java.util.List;
import java.util.concurrent.TimeUnit;

import com.ingenico.direct.logging.LoggingCapable;

/**
 * Used to communicate with the Ingenico ePayments platform web services.
 * 

* It contains all the logic to transform a request object to a HTTP request and * a HTTP response to a response object. *

* Thread-safe. */ public interface Communicator extends Closeable, LoggingCapable { /** * Corresponds to the HTTP GET method. * * @param relativePath The path to call, relative to the base URI. * @param requestHeaders An optional list of request headers. * @param requestParameters An optional set of request parameters. * @param responseType The type of response to return. * @param context The optional call context to use. * @throws CommunicationException when an exception occurred communicating with the Ingenico ePayments platform * @throws ResponseException when an error response was received from the Ingenico ePayments platform * @throws ApiException when an error response was received from the Ingenico ePayments platform which contained a list of errors */ @SuppressWarnings("resource") O get(String relativePath, List requestHeaders, ParamRequest requestParameters, Class responseType, CallContext context); /** * Corresponds to the HTTP DELETE method. * * @param relativePath The path to call, relative to the base URI. * @param requestHeaders An optional list of request headers. * @param requestParameters An optional set of request parameters. * @param responseType The type of response to return. * @param context The optional call context to use. * @throws CommunicationException when an exception occurred communicating with the Ingenico ePayments platform * @throws ResponseException when an error response was received from the Ingenico ePayments platform * @throws ApiException when an error response was received from the Ingenico ePayments platform which contained a list of errors */ @SuppressWarnings("resource") O delete(String relativePath, List requestHeaders, ParamRequest requestParameters, Class responseType, CallContext context); /** * Corresponds to the HTTP POST method. * * @param relativePath The path to call, relative to the base URI. * @param requestHeaders An optional list of request headers. * @param requestParameters An optional set of request parameters. * @param requestBody The optional request body to send. * @param responseType The type of response to return. * @param context The optional call context to use. * @throws CommunicationException when an exception occurred communicating with the Ingenico ePayments platform * @throws ResponseException when an error response was received from the Ingenico ePayments platform * @throws ApiException when an error response was received from the Ingenico ePayments platform which contained a list of errors */ @SuppressWarnings("resource") O post(String relativePath, List requestHeaders, ParamRequest requestParameters, Object requestBody, Class responseType, CallContext context); /** * Corresponds to the HTTP PUT method. * * @param relativePath The path to call, relative to the base URI. * @param requestHeaders An optional list of request headers. * @param requestParameters An optional set of request parameters. * @param requestBody The optional request body to send. * @param responseType The type of response to return. * @param context The optional call context to use. * @throws CommunicationException when an exception occurred communicating with the Ingenico ePayments platform * @throws ResponseException when an error response was received from the Ingenico ePayments platform * @throws ApiException when an error response was received from the Ingenico ePayments platform which contained a list of errors */ @SuppressWarnings("resource") O put(String relativePath, List requestHeaders, ParamRequest requestParameters, Object requestBody, Class responseType, CallContext context); Connection getConnection(); Authenticator getAuthenticator(); MetaDataProvider getMetaDataProvider(); Marshaller getMarshaller(); void closeIdleConnections(long idleTime, TimeUnit timeUnit); void closeExpiredConnections(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy