Interface IntentService

    • Method Detail

      • submit

        void submit​(Intent intent)
        Submits an intent into the system.

        This is an asynchronous request meaning that any compiling or installation activities may be done at later time.

        Parameters:
        intent - intent to be submitted
      • withdraw

        void withdraw​(Intent intent)
        Withdraws an intent from the system.

        This is an asynchronous request meaning that the environment may be affected at later time.

        Parameters:
        intent - intent to be withdrawn
      • purge

        void purge​(Intent intent)
        Purges a specific intent from the system if it is FAILED or WITHDRAWN. Otherwise, the intent remains in its current state.
        Parameters:
        intent - intent to purge
      • getIntent

        Intent getIntent​(Key key)
        Fetches an intent based on its key.
        Parameters:
        key - key of the intent
        Returns:
        intent object if the key is found, null otherwise
      • getIntents

        Iterable<Intent> getIntents()
        Returns an iterable of intents currently in the system.
        Returns:
        set of intents
      • addPending

        void addPending​(IntentData intentData)
        Adds an intent data object to the pending map for processing.

        This method is intended to only be called by core components, not applications.

        Parameters:
        intentData - intent data to be added to pending map
      • getIntentData

        Iterable<IntentData> getIntentData()
        Returns an iterable of intent data objects currently in the system.
        Returns:
        set of intent data objects
      • getIntentCount

        long getIntentCount()
        Returns the number of intents currently in the system.
        Returns:
        number of intents
      • getIntentState

        IntentState getIntentState​(Key intentKey)
        Retrieves the state of an intent by its identifier.
        Parameters:
        intentKey - intent identifier
        Returns:
        the intent state or null if one with the given identifier is not found
      • getInstallableIntents

        List<Intent> getInstallableIntents​(Key intentKey)
        Returns the list of the installable events associated with the specified top-level intent.
        Parameters:
        intentKey - top-level intent identifier
        Returns:
        compiled installable intents
      • isLocal

        boolean isLocal​(Key intentKey)
        Signifies whether the local node is responsible for processing the given intent key.
        Parameters:
        intentKey - intent key to check
        Returns:
        true if the local node is responsible for the intent key, otherwise false
      • getPending

        Iterable<Intent> getPending()
        Returns the list of intent requests pending processing.
        Returns:
        intents pending processing