@Beta public interface IntentService extends ListenerService<IntentEvent,IntentListener>
Modifier and Type | Method and Description |
---|---|
void |
addPending(IntentData intentData)
Adds an intent data object to the pending map for processing.
|
java.util.List<Intent> |
getInstallableIntents(Key intentKey)
Returns the list of the installable events associated with the specified
top-level intent.
|
Intent |
getIntent(Key key)
Fetches an intent based on its key.
|
long |
getIntentCount()
Returns the number of intents currently in the system.
|
java.lang.Iterable<IntentData> |
getIntentData()
Returns an iterable of intent data objects currently in the system.
|
java.lang.Iterable<Intent> |
getIntents()
Returns an iterable of intents currently in the system.
|
IntentState |
getIntentState(Key intentKey)
Retrieves the state of an intent by its identifier.
|
java.lang.Iterable<Intent> |
getPending()
Returns the list of intent requests pending processing.
|
boolean |
isLocal(Key intentKey)
Signifies whether the local node is responsible for processing the given
intent key.
|
void |
purge(Intent intent)
Purges a specific intent from the system if it is FAILED or
WITHDRAWN.
|
void |
submit(Intent intent)
Submits an intent into the system.
|
void |
withdraw(Intent intent)
Withdraws an intent from the system.
|
addListener, removeListener
void submit(Intent intent)
This is an asynchronous request meaning that any compiling or installation activities may be done at later time.
intent
- intent to be submittedvoid withdraw(Intent intent)
This is an asynchronous request meaning that the environment may be affected at later time.
intent
- intent to be withdrawnvoid purge(Intent intent)
intent
- intent to purgeIntent getIntent(Key key)
key
- key of the intentjava.lang.Iterable<Intent> getIntents()
void addPending(IntentData intentData)
This method is intended to only be called by core components, not applications.
intentData
- intent data to be added to pending mapjava.lang.Iterable<IntentData> getIntentData()
long getIntentCount()
IntentState getIntentState(Key intentKey)
intentKey
- intent identifierjava.util.List<Intent> getInstallableIntents(Key intentKey)
intentKey
- top-level intent identifierboolean isLocal(Key intentKey)
intentKey
- intent key to checkjava.lang.Iterable<Intent> getPending()