Package com.swrve.sdk

Interface SwrveUserResourcesDiffListener

  • All Known Implementing Classes:
    UIThreadSwrveResourcesDiffRunnable, UIThreadSwrveUserResourcesDiffListener

    public interface SwrveUserResourcesDiffListener
    Implement this interface to handle the result of Swrve::getUserResourceDiffs(). Note: the methods in this object will be invoked from a different thread than the one used to call Swrve::getUserResourceDiffs().
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void onUserResourcesDiffError​(java.lang.Exception exception)
      Called back on error.
      void onUserResourcesDiffSuccess​(java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> oldResourcesValues, java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> newResourcesValues, java.lang.String resourcesAsJSON)
      This method is invoked asynchronously to return the request response of the Swrve::getUserResourceDiffs().
    • Method Detail

      • onUserResourcesDiffSuccess

        void onUserResourcesDiffSuccess​(java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> oldResourcesValues,
                                        java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> newResourcesValues,
                                        java.lang.String resourcesAsJSON)
        This method is invoked asynchronously to return the request response of the Swrve::getUserResourceDiffs(). Note: this method is invoked from a different thread than the thread used to call Swrve::getUserResourceDiffs().
        Parameters:
        oldResourcesValues - the old values of AB Tested resources represented as a map in the form uid=(attribute_name=attribute_value).
        newResourcesValues - the new values of AB Tested resources represented as a map in the form uid=(attribute_name=attribute_value).
        resourcesAsJSON - the resources as JSON.
      • onUserResourcesDiffError

        void onUserResourcesDiffError​(java.lang.Exception exception)
        Called back on error.
        Parameters:
        exception - Exception caused when trying to obtain user resources.