Class MGConnectionConfiguration.Builder
- java.lang.Object
-
- com.gemalto.mfs.mwsdk.mobilegateway.MGConnectionConfiguration.Builder
-
- Enclosing class:
- MGConnectionConfiguration
public static class MGConnectionConfiguration.Builder extends java.lang.Object
Builder to build MGConnectionConfiguration.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MGConnectionConfiguration
build()
MGConnectionConfiguration.Builder
setConnectionParameters(java.lang.String url, int timeout, int readTimeout)
Method to set Connection parameters of the MG Client Library.MGConnectionConfiguration.Builder
setRetryParameters(int count, int interval)
Method to set Connection retry parameters of the MG Client Library
-
-
-
Method Detail
-
setConnectionParameters
public MGConnectionConfiguration.Builder setConnectionParameters(java.lang.String url, int timeout, int readTimeout) throws MGConfigurationException
Method to set Connection parameters of the MG Client Library. This method call is mandatory before callingbuild()
.- Parameters:
url
- The connection URL where the MG Client Library will connect to.timeout
- If the library is unable to connect to the server within this value, timeout will occur.readTimeout
- If the library is able to connect to the server but reading the response did not finish within this value, timeout will occur.- Returns:
- Builder
- Throws:
MGConfigurationException
-
setRetryParameters
public MGConnectionConfiguration.Builder setRetryParameters(int count, int interval)
Method to set Connection retry parameters of the MG Client Library- Parameters:
count
- The number of retries the library will perform if the request can be retried.interval
- The library will initiate another retry after this value for requests that can be retried.- Returns:
- the builder with new parameters set
-
build
public MGConnectionConfiguration build()
- Returns:
MGConnectionConfiguration
object.
-
-