public class HttpApiTransport extends Transport
| Modifier and Type | Field and Description |
|---|---|
protected String |
apiKey
Cache the api key (minimize file reads to once per instatiation).
|
static String |
CUSTOM_HEADER_API_KEY |
static String |
CUSTOM_HEADER_MERCHANT_ID |
static int |
DEFAULT_CONNECTION_IDLE_TIMEOUT_MINUTES |
static int |
DEFAULT_CONNECTION_TIMEOUT_MS |
static int |
DEFAULT_MAX_CONNECTIONS |
static int |
DEFAULT_SOCKET_TIMEOUT_MS |
connectTimeout, readTimeout, risServerUrl| Constructor and Description |
|---|
HttpApiTransport()
Default transport constructor.
|
HttpApiTransport(URL url,
String key)
Constructor that accepts a RIS url and an api key as input.
|
HttpApiTransport(URL url,
String key,
int maxConnections,
int maxConnectionsPerRoute)
Constructor that accepts a RIS url and an api key as input.
|
| Modifier and Type | Method and Description |
|---|---|
ByteArrayInputStream |
readAllIntput(org.apache.http.HttpEntity entity) |
Reader |
send(Map<String,String> params)
Send transaction data to RIS.
|
void |
setApiKey(String key)
Set API Key.
|
void |
setConnectionTimeToLive(int minutes)
Set Connection Time To Live.
|
convertToNameValuePair, setConnectTimeout, setReadTimeout, setRisServerUrl, writeParametersToOutputpublic static final int DEFAULT_MAX_CONNECTIONS
public static final int DEFAULT_CONNECTION_IDLE_TIMEOUT_MINUTES
public static final int DEFAULT_CONNECTION_TIMEOUT_MS
public static final int DEFAULT_SOCKET_TIMEOUT_MS
public static final String CUSTOM_HEADER_MERCHANT_ID
public static final String CUSTOM_HEADER_API_KEY
protected String apiKey
public HttpApiTransport()
public HttpApiTransport(URL url, String key)
url - RIS server url.key - API key.public HttpApiTransport(URL url, String key, int maxConnections, int maxConnectionsPerRoute)
url - RIS server url.key - API key.maxConnections - connection Pool Threads.maxConnectionsPerRoute - connection Per Route.public void setApiKey(String key)
key - String Kount Api Key (public) to use for authentication with RIS
server.public void setConnectionTimeToLive(int minutes)
minutes - integer specifying the connection time to live in minutes.public Reader send(Map<String,String> params) throws RisTransportException
send in class Transportparams - Map of data to sendRisTransportException - RIS transport exceptionpublic ByteArrayInputStream readAllIntput(org.apache.http.HttpEntity entity) throws IOException
IOExceptionCopyright © 2022. All rights reserved.