public abstract class Transport extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
connectTimeout
Ris connection establishment timeout, a timeout of zero is interpreted as an
infinite timeout.
|
protected int |
readTimeout
Ris connection read timeout, a timeout of zero is interpreted as an infinite
timeout.
|
protected String |
risServerUrl
Ris server endpoint url.
|
| Constructor and Description |
|---|
Transport() |
| Modifier and Type | Method and Description |
|---|---|
protected List<org.apache.http.NameValuePair> |
convertToNameValuePair(Map<String,String> params) |
abstract Reader |
send(Map<String,String> params)
Send transaction data to RIS.
|
void |
setConnectTimeout(int timeout)
Set the transports connection timeout.
|
void |
setReadTimeout(int timeout)
Set the transports connection read timeout.
|
void |
setRisServerUrl(String url)
Set the RIS server url.
|
protected static void |
writeParametersToOutput(OutputStreamWriter out,
Map<String,String> params)
Serializes the given map of request parameters to the provided
OutputStream. |
protected String risServerUrl
protected int connectTimeout
protected int readTimeout
public abstract Reader send(Map<String,String> params) throws RisTransportException
params - Map of data to sendRisTransportException - RIS transport exceptionpublic void setRisServerUrl(String url)
url - Urlpublic void setConnectTimeout(int timeout)
timeout - Timeout in millisecondspublic void setReadTimeout(int timeout)
timeout - Timeout in millisecondsprotected static void writeParametersToOutput(OutputStreamWriter out, Map<String,String> params) throws IOException
OutputStream.
All values are URL-encoded with UTF-8.out - params - IOExceptionCopyright © 2022. All rights reserved.