public class KountRisClient extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
apiKey
API key for merchant-server authentication.
|
protected StringBuilder |
errorMessage
StringBuilder to accumulate any error message found in the response being processed.
|
protected Transport |
transport
Transport to use for sending RIS request.
|
| Constructor and Description |
|---|
KountRisClient()
Explicit default constructor.
|
KountRisClient(String phrase,
String url,
InputStream p12in)
Constructor that accepts a pass phrase.
|
KountRisClient(String phrase,
String url,
String p12file)
Constructor that accepts a pass phrase.
|
KountRisClient(URL url,
File apiKeyFile)
Constructor for using API Keys instead of Certificates.
|
KountRisClient(URL url,
File apiKeyFile,
int connectionPoolThreads,
int connectionPerRoute)
Constructor for using API Key instead of Cert.
|
KountRisClient(URL url,
String key)
Constructor for using API Key instead of Cert.
|
KountRisClient(URL url,
String key,
int connectionPoolThreads,
int connectionPerRoute)
Constructor for using API Key instead of Cert.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
getApiKey(File apiKeyFile)
Fetch data contained in api key file.
|
protected Response |
parse(Reader r)
Parse a collection of key-value strings into a Response object.
|
Response |
process(Request r)
Performs the actions of sending, and parsing a RIS request.
|
protected Reader |
send(Request r)
Send a RIS request.
|
void |
setApiKey(String key)
Set api key to use.
|
void |
setTransport(Transport t)
Set the transport object to use.
|
protected Transport transport
protected StringBuilder errorMessage
protected String apiKey
public KountRisClient()
public KountRisClient(String phrase, String url, String p12file)
phrase - Private key pass phraseurl - RIS server urlp12file - Path to PKCS12 private key filepublic KountRisClient(String phrase, String url, InputStream p12in)
phrase - Private key pass phraseurl - RIS server urlp12in - PKCS12 private key file input streampublic KountRisClient(URL url, File apiKeyFile) throws RisTransportException
url - Ris server URLapiKeyFile - API key file (absolute path)RisTransportException - Exception if opening the api key file has a problem.public KountRisClient(URL url, File apiKeyFile, int connectionPoolThreads, int connectionPerRoute) throws RisTransportException
url - Ris server URL.apiKeyFile - API key (key data as a string).connectionPoolThreads - API key (key data as a int).connectionPerRoute - API key (key data as a int).RisTransportExceptionpublic KountRisClient(URL url, String key)
url - Ris server URL.key - API key (key data as a string).public KountRisClient(URL url, String key, int connectionPoolThreads, int connectionPerRoute)
url - Ris server URL.key - API key (key data as a string).connectionPoolThreads - API key (key data as a int).connectionPerRoute - API key (key data as a int).public void setTransport(Transport t)
t - Transportpublic void setApiKey(String key)
key - Api key (value).public Response process(Request r) throws RisException
r - RequestRisException - A subclass of RisException will be thrown which will be of
the type RisResponseException, RisTransportException.protected Reader send(Request r) throws RisTransportException
r - Request object to send.RisTransportException - RIS transport exceptionprotected Response parse(Reader r) throws RisResponseException
r - Reader for character stream returned by RISRisResponseException - RIS response exceptionprotected final String getApiKey(File apiKeyFile) throws RisTransportException
apiKeyFile - API key file.RisTransportException - RIS transport exceptionCopyright © 2022. All rights reserved.