com.imiconnect.connect.core.client.InternalClient 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
IMIConnect platform Java SDK client library.
The newest version!
package com.imiconnect.connect.core.client;
import com.imiconnect.connect.core.ConnectException;
import com.imiconnect.connect.core.type.IdempotentRequest;
/**
* Defines the methods that are used to interact with all API services. The implementations of this
* interface are intended to be for internal SDK use only. The contract may change at any time.
*/
public interface InternalClient extends ConnectClient {
/**
* Send a GET request.
*
* @param path The path that is appended to the base url.
* @param responseType The type of response.
* @param The type of response.
* @return The response object parsed into an instance of the responseType class.
* @throws ConnectException When there is any issue communicating with API or (de)serializing the
* entities. Specific subtypes of the exception may be returned such as a
* ClientResponseException when communication with the API is successful, but it returned a
* non-successful (2xx) response.
*/
R get(String path, Class responseType) throws ConnectException;
/**
* Send a POST request.
*
* @param path The path that is appended to the base url.
* @param request The request object to serialize as json and send as the payload in the post
* request.
* @param responseType The type of response.
* @param The type of response.
* @return The response object.
* @throws ConnectException When there is any issue communicating with API or (de)serializing the
* entities. Specific subtypes of the exception may be returned such as a
* ClientResponseException when communication with the API is successful, but it returned a
* non-successful (2xx) response.
*/
R post(String path, IdempotentRequest request, Class responseType)
throws ConnectException;
}