Class Edge


  • public class Edge
    extends Object
    • Field Detail

      • EXTENSION

        public static final Class<? extends com.adobe.marketing.mobile.Extension> EXTENSION
    • Method Detail

      • extensionVersion

        @NonNull
        public static String extensionVersion()
        Returns the version of the Edge extension
        Returns:
        The version as String
      • registerExtension

        @Deprecated
        public static void registerExtension()
        Deprecated.
        as of 2.0.0, use MobileCore.registerExtensions(List, AdobeCallback) with EXTENSION instead.
        Registers the extension with the Mobile SDK. This method should be called only once in your application class.
      • sendEvent

        public static void sendEvent​(@NonNull
                                     ExperienceEvent experienceEvent,
                                     @Nullable
                                     EdgeCallback callback)
        Sends an event to Adobe Experience Edge and registers a callback for responses coming from the Edge Network.
        Parameters:
        experienceEvent - event to be sent to Adobe Experience Edge; should not be null
        callback - optional callback to be invoked when the request is complete, returning the associated response handles received from the Adobe Experience Edge. It may be invoked on a different thread.
      • getLocationHint

        public static void getLocationHint​(@NonNull
                                           com.adobe.marketing.mobile.AdobeCallback<String> callback)
        Gets the Edge Network location hint used in requests to the Adobe Experience Platform Edge Network. The Edge Network location hint may be used when building the URL for Adobe Experience Platform Edge Network requests to hint at the server cluster to use. Returns the Edge Network location hint, or null if the location hint expired or is not set.
        Parameters:
        callback - AdobeCallback of String invoked with a value containing the Edge Network location hint. The returned location hint may be null if the hint expired or none is set. If an AdobeCallbackWithError is provided, an AdobeError can be returned in the eventuality of an error.
      • setLocationHint

        public static void setLocationHint​(@Nullable
                                           String hint)
        Sets the Edge Network location hint used in requests to the Adobe Experience Platform Edge Network. Sets the Edge Network location hint used in requests to the AEP Edge Network causing requests to "stick" to a specific server cluster. Passing null or an empty string clears the existing location hint. Edge Network responses may overwrite the location hint to a new value when necessary to manage network traffic.

        Use caution when setting the location hint. Only use location hints for the "EdgeNetwork" scope. An incorrect location hint value will cause all Edge Network requests to fail.

        Parameters:
        hint - the Edge Network location hint to use when connecting to the Adobe Experience Platform Edge Network