Class BatchWebservice

    • Field Detail

      • retryCount

        protected int retryCount
        Number of retry done for this query
    • Constructor Detail

      • BatchWebservice

        protected BatchWebservice​(android.content.Context context,
                                  Webservice.RequestType type,
                                  java.lang.String baseURLFormat,
                                  java.lang.String... parameters)
                           throws java.net.MalformedURLException
        Parameters:
        context -
        baseURLFormat - an url to format with api key (ex : http://sample.com/%s/sample)
        Throws:
        java.net.MalformedURLException
    • Method Detail

      • addDefaultHeaders

        protected void addDefaultHeaders()
        Description copied from class: Webservice
        Add default headers to the WS request
        Overrides:
        addDefaultHeaders in class Webservice
      • onRetry

        protected void onRetry​(WebserviceErrorCause cause)
        Description copied from class: Webservice
        Called when a retry is made after a failure
        Nothing done here, but child may want to override it
        Overrides:
        onRetry in class Webservice
      • getPropertyParameterKey

        protected abstract java.lang.String getPropertyParameterKey()
        Get property parameter key to add parameter to the get chain
        Returns:
        property key or null if no property is wanted for this webservice
      • handleParameters

        protected void handleParameters​(JSONObject body)
        Read parameters from ws response
        Parameters:
        body -
      • handleServerID

        protected void handleServerID​(JSONObject body)
        Read server id from ws response
        Parameters:
        body -