Package 

Class MenigaSettings.Builder

    • Method Detail

      • endpoint

         MenigaSettings.Builder endpoint(HttpUrl endpoint)

        Sets a endpoint URL for the SDK to communicate with.

        Parameters:
        endpoint - an HttpUrl object with an parsed endpoint URL.
      • authenticator

         MenigaSettings.Builder authenticator(Authenticator authenticator)

        Sets a custom authenticator. Consumers have to implement Authenticator interface provided with OkHttp and provide a way for the SDK to authenticateitself to an endpoint. This varies between consumers who often have custom authentication schemes.

        Parameters:
        authenticator - An implementation of AuthenticationProvider interface.
      • errorHandler

         MenigaSettings.Builder errorHandler(CustomErrorHandler errorHandler)

        Sets a custom error handler. If set the error handler will be called to handle all errorsoccurring inside the sdk. The default behavior is to log out the throwable at level error viathe standard android logging functionality.

        Parameters:
        errorHandler - An implementation of CustomErrorHandler interface.
      • persistenceMode

         MenigaSettings.Builder persistenceMode(PersistenceMode persistenceMode)

        Sets the persistence mode. There are two modes, persistence first and network first. Persistencefirst always first checks to see if an object can be found in the persistence store and thengoes on the network if it is not found, network first always first goes through the network andonly checks and retrieved a persisted object if a network call fails

        Parameters:
        persistenceMode - The persistance mode enum
      • timeout

         MenigaSettings.Builder timeout(long timeoutInSeconds)

        Sets the OkHttp read and write timeout limit in seconds

        Parameters:
        timeoutInSeconds - The client time out in seconds
      • addEndpointForService

         MenigaSettings.Builder addEndpointForService(Service service, String endpoint)

        Adds a special endpoint url for a specific model class type (service). This way certainmodel classes can use other endpoints than the default given one.

        Parameters:
        service - The service should have a different endpoint
        endpoint - The endpoint for the model class type
      • addEndpointForServiceWithTimeout

         MenigaSettings.Builder addEndpointForServiceWithTimeout(Service service, String endpoint, int timeoutInSeconds)

        Adds a special endpoint url for a specific model class type (service). This way certainmodel classes can use other endpoints than the default given one. Additionallyspecifies the timeout the client should use for the service.

        Parameters:
        service - The service should have a different endpoint
        endpoint - The endpoint for the model class type
        timeoutInSeconds - The client timeout, in seconds
      • addHttpInterceptor

         MenigaSettings.Builder addHttpInterceptor(Interceptor interceptor)

        Adds an interceptor to the OkHttp client for custom request/response intercept operations as needed

        Parameters:
        interceptor - The OkHttp interceptor to createOfferAccount