Class CreateRequestActionHandler

  • All Implemented Interfaces:
    ActionHandler


    public final class CreateRequestActionHandler
    extends java.lang.Object
    implements ActionHandler
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean canHandle(java.lang.String actionName)
      Determines whether or not the ActionHandler object can handle the given action String.
      ActionDescription getActionDescription() 
      int getPriority()
      Returns the priority of the ActionHandler.
      void handle(java.util.Map<java.lang.String,java.lang.Object> data, Context context)
      Invokes an action on the given action String.
      void updateSettings(java.util.Map<java.lang.String,JsonElement> settings)
      Notifies the ActionHandler of an update to settings.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • canHandle

        public boolean canHandle(java.lang.String actionName)
        Description copied from interface: ActionHandler
        Determines whether or not the ActionHandler object can handle the given action String.
        Specified by:
        canHandle in interface ActionHandler
        Parameters:
        actionName - the action String to check against.
        Returns:
        true if the action String can be handled, false if it can't.
      • handle

        public void handle(java.util.Map<java.lang.String,java.lang.Object> data,
                           Context context)
        Description copied from interface: ActionHandler
        Invokes an action on the given action String. This is expected to be the starting of an Activity, hence the Context parameter.

        This method can be called before init for a given SDK is performed so you need to check if any SDK's called here are initialised before any action takes place.

        Specified by:
        handle in interface ActionHandler
        Parameters:
        data - an optional map of key-value pairs for the ActionHandler to use in handling the action.
        context - the Context to use in invoking the action, such as starting an Activity.
      • getPriority

        public int getPriority()
        Description copied from interface: ActionHandler
        Returns the priority of the ActionHandler. The higher the number, the higher the priority.
        Specified by:
        getPriority in interface ActionHandler
        Returns:
        the priority of the ActionHandler.
      • updateSettings

        public void updateSettings(java.util.Map<java.lang.String,JsonElement> settings)
        Description copied from interface: ActionHandler
        Notifies the ActionHandler of an update to settings. These settings allows the ActionHandler to determine whether they should be enabled. This will contain settings for each of the SDKs enabled for this account. Each ActionHandler should extract the settings object relating to its specific SDK and only store that.
        Specified by:
        updateSettings in interface ActionHandler
        Parameters:
        settings - a map representing the SDK settings for the current instance.