public class MerchantConfig extends Object
| Constructor and Description |
|---|
MerchantConfig(Properties _props,
String _merchantID) |
| Modifier and Type | Method and Description |
|---|---|
String |
getCacertPassword()
Getter method for cacertPassword
|
int |
getConnectionRequestTimeoutMs()
Time taken in milliseconds to get connection request from the pool.
|
int |
getConnectionTimeoutMs()
Specifies the number of milliseconds to wait while a connection is being established.
|
String |
getCustomHttpClass() |
int |
getDefaultMaxConnectionsPerRoute()
the maximum number of connections per (any) route
|
String |
getEffectiveNamespaceURI()
Returns the effective namespace URI to be used to parse the request and
reply documents.
|
String |
getEffectivePassword()
Returns the effective key password.
|
String |
getEffectiveServerURL()
Returns the effective server URL to which the request will be sent.
|
boolean |
getEnableLog() |
int |
getEvictThreadSleepTimeMs()
Specifies time duration in milliseconds between "sweeps" by the "idle connection" evictor thread.
|
String |
getKeyAlias()
If keyAlias not null, return keyAlias, else return merchantId
|
File |
getKeyFile()
Returns a File object representing the key file.
|
String |
getKeyFilename() |
String |
getKeyPassword()
If keyPassword not null, return keyPassword, else return merchantId
|
String |
getKeysDirectory() |
String |
getLogDirectory() |
File |
getLogFile()
Returns a File object representing the log file.
|
String |
getLogFilename() |
int |
getLogMaximumSize() |
boolean |
getLogSignedData() |
String |
getLogString()
Returns a string representation of the properties for logging purposes.
|
int |
getMaxConnections()
Specifies the maximum number of concurrent, active HTTP connections allowed by the resource instance to be opened with the target service.
|
int |
getMaxConnectionsPerRoute()
Specifies the maximum number of concurrent, active HTTP connections allowed by the resource instance to the same host or route.
|
int |
getMaxKeepAliveTimeMs()
Specifies the time duration in milliseconds that a connection can be idle before it is evicted from the pool.
|
String |
getMerchantID() |
String |
getNamespaceURI() |
int |
getNumberOfRetries()
Getter method for numberOfRetries
|
String |
getPassword() |
String |
getProperty(String merchantID,
String prop)
Returns the value of the specified property.
|
String |
getProperty(String merchantID,
String prop,
String defaultVal)
Returns the value of the specified property.
|
String |
getProxyHost() |
String |
getProxyPassword() |
int |
getProxyPort() |
String |
getProxyUser() |
long |
getRetryInterval()
Getter method for retryInterval
added <=1 check as in previous release(6.2.9 or lower) it was set in seconds.
|
boolean |
getSendToAkamai() |
boolean |
getSendToProduction() |
String |
getServerURL() |
int |
getSocketTimeoutMs()
Specifies the time waiting for data – after establishing the connection; maximum time of inactivity between two data packets.
|
String |
getTargetAPIVersion() |
int |
getTimeout()
Deprecated.
|
boolean |
getUseHttpClient() |
boolean |
getUseHttpClientWithConnectionPool() |
boolean |
getUseSignAndEncrypted() |
int |
getValidateAfterInactivityMs()
Defines period of inactivity in milliseconds after which persistent connections must be re-validated prior to being
leased to the consumer.
|
boolean |
isAllowRetry()
Getter method for allowRetry
|
boolean |
isCacertEnabled()
Getter method for enableCacert
|
boolean |
isCertificateCacheEnabled()
If this property is set to false then the p12 certificate of a merchant will be reloaded
every time a transaction is made
|
boolean |
isCustomHttpClassEnabled() |
boolean |
isJdkCertEnabled()
Getter method for enableJdkCert
|
boolean |
isMerchantConfigCacheEnabled()
If this property is set to true (default value is false) it will cache the merchantConfig object based on keyAlias/merchantID
If cache enabled is true, for single merchant id, if you change any properties after first initialization, it will not reflect
|
boolean |
isShutdownHookEnabled()
This is to enable shutdown hook in case of httpclient with connection Polling.
|
boolean |
isStaleConnectionCheckEnabled()
It determines whether the stale connection check is to be used.
|
boolean |
retryIfMTIFieldExistEnabled()
retryIfMTIFieldExist If enabled then SDK will retry the transaction in case when connection pooling http client is used
and if SDK receives an I/O error/exception, when executing a request over a connection that has been closed at the server side.
|
void |
setAllowRetry(boolean allowRetry)
Setter method for allowRetry
|
public MerchantConfig(Properties _props, String _merchantID) throws ConfigException
_props - Properties object to get properties from. May be
null, in which case, all properties will be read
from the System properties._merchantID - merchantID. May be null. If specified, merchant-
specific properties will take precedence over
the generic ones (i.e. those that do not start
with a merchant id prefix).
See README for more information.ConfigException - if something is missing of invalid in the
configuration.public boolean getUseSignAndEncrypted()
public String getMerchantID()
public String getKeysDirectory()
public String getKeyAlias()
public String getKeyPassword()
public boolean getSendToProduction()
public boolean getSendToAkamai()
public String getTargetAPIVersion()
public String getKeyFilename()
public String getServerURL()
public String getNamespaceURI()
public String getPassword()
public boolean getEnableLog()
public boolean getLogSignedData()
public String getLogDirectory()
public String getLogFilename()
public int getLogMaximumSize()
public boolean retryIfMTIFieldExistEnabled()
public boolean getUseHttpClient()
public boolean getUseHttpClientWithConnectionPool()
@Deprecated public int getTimeout()
public int getMaxConnections()
public int getDefaultMaxConnectionsPerRoute()
public int getMaxConnectionsPerRoute()
public int getConnectionRequestTimeoutMs()
public int getConnectionTimeoutMs()
public int getSocketTimeoutMs()
public int getEvictThreadSleepTimeMs()
public int getMaxKeepAliveTimeMs()
public int getValidateAfterInactivityMs()
public String getProxyHost()
public int getProxyPort()
public String getProxyUser()
public String getProxyPassword()
public boolean isCertificateCacheEnabled()
public boolean isMerchantConfigCacheEnabled()
public boolean isStaleConnectionCheckEnabled()
public boolean isShutdownHookEnabled()
public String getEffectiveServerURL()
public String getEffectiveNamespaceURI()
public String getEffectivePassword()
public File getKeyFile() throws ConfigException
ConfigException - if the file is missing, is not a file, or is
not readable.public File getLogFile() throws ConfigException
ConfigException - if the directory specified for the log file is
missing or is not a directory.public String getProperty(String merchantID, String prop)
merchantID - merchant id.prop - property to search for.null if none
is found.public String getProperty(String merchantID, String prop, String defaultVal)
merchantID - merchant id.prop - property to search for.defaultVal - default value to return if property is not found
(may be null).public String getLogString()
public int getNumberOfRetries()
public long getRetryInterval()
public boolean isAllowRetry()
public void setAllowRetry(boolean allowRetry)
allowRetry - public boolean isCacertEnabled()
public boolean isJdkCertEnabled()
public String getCacertPassword()
public String getCustomHttpClass()
public boolean isCustomHttpClassEnabled()
Copyright © 2022. All rights reserved.