Skip to content

TriggerFactory

Creates a TriggerExecutor for a TriggerConfiguration by runtime type.

Sampling packages that define their own triggers implement one and register it with ExecutorFactory.registerTriggerFactory. See SmartphoneTriggerFactory for the built-in triggers.

Implementers

Constructors

TriggerFactory

TriggerFactory()

Properties

types

Set<Type> get types

The TriggerConfiguration runtime types this factory supports.

Methods

create

Create a TriggerExecutor based on trigger. Returns null if trigger is not supported by this factory.

onRegister

void onRegister()

Called when this factory is registered in the ExecutorFactory.

Typically used to register the triggers' JSON deserializers.