Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public interface IntentDispatcher
Internal contract between the build-time-generated intent table and the
framework. Application code should neither implement nor call this –
declare intents with com.codename1.annotations.AppIntent and, if you need
to run one yourself, call Intents.invoke.
A single implementation is generated by the Codename One Maven plugin from
the AppIntent and IntentEntity annotations in the project and installs
itself on Intents during startup. Every call it makes into application code
is a direct static invocation emitted at build time: there is no reflection,
which is what lets the whole mechanism survive the iOS translator’s dead-code
elimination and Android’s obfuscation.
Methods
Method details
describe
public abstract List<IntentDeclaration> describe()invoke
public abstract IntentResult invoke(String intentId, Map<String, Object> params, IntentContext ctx)String
for entities, which the generated code resolves through the entity’s
BY_ID query before calling the handler.Parameters
intentIdString- the declared intent id
paramsMap<String, Object>- parameter values keyed by name, never null
ctxIntentContext- the invocation context
Returns
queryEntities
public abstract List<AppEntity> queryEntities(String entityType, String kind, String argument)Parameters
entityTypeString- the entity type id
kindStringbyId,suggestedorsearchargumentString- the id for
byId, the search text forsearch, ignored forsuggested