You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+69-7Lines changed: 69 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,15 +62,33 @@ You do not need to download and build the source to use the SDK but if you want
62
62
- To know how to convert p12 to JKS refer the JKS creation section of this document.
63
63
- If 'enableCacert' property parameter is set to true, certificates will be read from the cacerts file specified at keysDirectory location.If keysDirectory path is not set,certificate will be loaded from Java Installation cacerts file. The cacerts file should be of the same name as specified in keyFilename.
64
64
- If `certificateCacheEnabled` parameter is set to false (default is true), the p12 certificate of a merchant will be reloaded from filesystem every time a transaction is made
65
-
-`allowRetry` config parameter will only work for HttpClient. Set `allowRetry` config parameter to "true" to enable retry mechanism and set merchant specific values for the retry.
66
-
- Set integer values for config parameter `numberOfRetries`*and*`retryInterval`. Retry Interval is time delay for next retry in seconds.
65
+
- If `useHttpClient` parameter is set to true (default is false), then simple HttpClientConnection will be enabled
66
+
- If `useHttpClientWithConnectionPool` parameter is set to true (default is false), then poolingHttpClientConnection will be enabled
67
+
- In case of poolingHttpConnection, we are initializing connection manager and httpclient once, If any change in value in between the application is running, it will not reflect. need to restart it.
68
+
- Refer to the [PoolingHttpClient Shutdown](README.md#poolinghttpclientshutdown) section below.
69
+
- If`enabledShutdownHook` is true (default is true), enables JVM runtime shutdown hook and execute our shutdown api. This is applicable only when useHttpClientWithConnectionPool is true.
70
+
- Below properties are specific to poolinghttpclient connection, If it is not added in properties file, it will throw config exception.
71
+
Note : Below default values used in properties files are based on our testing application factors such as TPS, CPU, JVM, OS etc
72
+
Before using these values in actual real time application, please consider all real time factors. Refer this link for more detailed explanation.
73
+
-`maxConnections` set the maximum number of total open connections. default value is 200
74
+
-`defaultMaxConnectionsPerRoute` Set the maximum number of concurrent connections per route. default value is 200
75
+
-`maxConnectionsPerRoute` Set the total number of concurrent connections to a specific route. default value is 200
76
+
-`connectionRequestTimeoutMs` the time to wait for a connection from the connection manager/pool. default value is 1000
77
+
-`connectionTimeoutMs` the time to establish the connection with the remote host. default value is 2000
78
+
-`socketTimeoutMs` the time waiting for data – after establishing the connection; maximum time of inactivity between two data packets. default value is 2000
79
+
-`evictThreadSleepTimeMs` amount of time in milliseconds between sweeps by the idle connection evictor thread. default value is 3000
80
+
-`maxKeepAliveTimeMs` maximum amount of time in milliseconds that a connection can be idle before it is evicted from the pool. default value is 30000
81
+
-`allowRetry` config parameter will only work for HttpClient and PoolingHttpClient. Set `allowRetry` config parameter to "true" to enable retry mechanism and set merchant specific values for the retry.
82
+
- Set integer values and long values for config parameter `numberOfRetries`*and*`retryInterval` respectively. Retry Interval is time delay for next retry in milliSeconds.
67
83
- Number of retry parameter should be set between 1 to 5. Any other value will throw an Error Message.
68
84
- Refer to the [Retry Pattern](README.md#retry-pattern) section below.
69
85
- Please refer to the accompanying documentation for the other optional properties that you may wish to specify.
70
86
- Set customHttpClassEnabled to true to make use of Custom Http Library.
71
87
- Enter the custom class name in customHttpClass field. Provide the full package name along with the class name.
72
88
example customHttpClass= <packagename.customHttpClass>
73
89
- The custom HTTP Class must have a three argument constructor which accepts MerchantConfig, DocumentBuilder and LoggerWrapper as argument. Then it should call the constructor of the parent class.
90
+
-`merchantConfigCacheEnabled` If this property is set to true (default value is false) it will cache the merchantConfig object based on keyAlias/merchantID
91
+
-If cache enabled is true, for single merchant id, if you change any properties after first initialization, it will not reflect.
74
92
- Build this project using Maven.
75
93
-`mvn clean` - Cleans the Project
76
94
-`mvn install` - Builds the project and creates a jar file of client SDK. Includes running all unit tests and integration tests
- The first entry should contain a chain of two certificates - `CyberSourceCertAuth` and <Merchant_ID> with alias name <Merchant_ID>
139
157
- Second entry should be for `CyberSource_SJC_US` certificate with alias name as CyberSource_SJC_US
140
158
141
-
159
+
## PoolingHttpClient
160
+
To get more information please refer wiki.
161
+
142
162
## Message Level Encryption
143
163
CyberSource supports Message Level Encryption (MLE) for Simple Order API. Message level encryption conforms to the SOAP Security 1.0 specification published by the OASIS standards group.
144
164
@@ -156,10 +176,10 @@ CyberSource supports Message Level Encryption (MLE) for Simple Order API. Messag
156
176
157
177
## Retry Pattern
158
178
159
-
Retry Pattern allows to retry sending a failed request and it will only work with `useHttpClient=true`. `allowRetry` flag enables the retry mechanism.
179
+
Retry Pattern allows to retry sending a failed request and it will only work with `useHttpClient=true` or `useHttpClientWithConnectionPool. `allowRetry` flag enables the retry mechanism.
160
180
- Set the value of `allowRetry` parameter to "TRUE/FALSE". Then the system will retry the failed request as many times as configured by the merchant in the config parameter 'numberOfRetries'.
161
-
- numberOfRetries parameter value should be set between 0 to 5. By default the value for numberOfRetries will be 5. User can set a delay in between the retry attempts.
162
-
- Config parameter for this property is 'retryInterval' in `cybs.property` file. The default value for 'retryInterval' parameter is 5 which means a delay of 5 seconds.
181
+
- numberOfRetries parameter value should be set between 0 to 5. By default the value for numberOfRetries will be 3. User can set a delay in between the retry attempts.
182
+
- Config parameter for this property is 'retryInterval' in `cybs.property` file. The default value for 'retryInterval' parameter is 1000 which means a delay of 1000 milliSeconds.
163
183
164
184
## Third Party jars
165
185
1. org.apache.ws.security.wss4j:1.6.19
@@ -180,12 +200,25 @@ Retry Pattern allows to retry sending a failed request and it will only work wit
180
200
JUnit is a unit testing framework for Java.
181
201
9. org.mockito:mockito-all:1.10.19
182
202
Mock objects library for java
203
+
10. org.apache.httpcomponents:httpclient:4.5.11
204
+
Provides reusable components for client-side authentication, HTTP state management, and HTTP connection management. It is used for poolinghttpclientconnectionmanager feature.
205
+
183
206
184
207
## Changes
185
208
186
-
Version Cybersource-sdk-java 6.2.9 (APR,2020)
209
+
Version Cybersource-sdk-java 6.2.10 (APR,2020)
187
210
_______________________________
188
211
212
+
1)MerchantConfig Object Caching based on KeyAlias/Merchant Id
0 commit comments