Class MGConnectionConfiguration.Builder

java.lang.Object
com.gemalto.mfs.mwsdk.mobilegateway.MGConnectionConfiguration.Builder
Enclosing class:
MGConnectionConfiguration

public static class MGConnectionConfiguration.Builder extends Object
Builder to build MGConnectionConfiguration.
  • Constructor Details

    • Builder

      public Builder()
      Constructor
  • Method Details

    • setConnectionParameters

      public MGConnectionConfiguration.Builder setConnectionParameters(String url, int timeout, int readTimeout) throws MGConfigurationException
      Method to set Connection parameters of the MG Client Library. This method call is mandatory before calling build().
      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.