ReceptorBase<C extends Cell> class
abstract
The foundational base implementation of Receptor that provides the core synchronization and pulse propagation engine.
ReceptorBase manages the multi-stage pipeline, error handling, and coordination of signal propagation. It serves as the bridge between incoming stimuli and the cell's internal state.
When to use
Use ReceptorBase as the base class for specialized receptor implementations. You typically don't construct this directly; instead, use the Receptor factory or predefined singletons.
How it works
- Pipeline Management: It stores and coordinates the three stages (Sanitization, Core Logic, and Commitment).
- Context Binding: It manages the transition from a stateless template to an activated, cell-bound instance.
- Resilient Propagation: The
callmethod validates the signal, runs the pipeline synchronously, and safely broadcasts results to synapses. - Lifecycle Control: It handles the activation and cloning of logic blueprints across different cell instances.
- Governance: When governed, it applies architectural policies and forensic trace information.
Type Parameters:
C: The type of the host Cell.
- Implemented types
-
- Receptor<
C>
- Receptor<
Constructors
-
ReceptorBase({Instruction<
Cell, Pulse, Pulse> ? instruction, Instruction<Cell, Pulse, Pulse> ? preProcess, Instruction<Cell, Pulse, Pulse> ? postProcess, Pulse? reaction(Pulse pulse, C host, {dynamic user})?, void init()?, dynamic user()?}) - Initializes the foundational engine for pulse transformation and state governance.
- ReceptorBase.fromRecord({Record record = ()})
- A foundational constructor that initializes a ReceptorBase from a pre-compiled Record of configuration properties.
Properties
-
async
→ ReceptorAsync<
C> -
Returns an asynchronous adapter for this receptor.
latefinal
- cell ↔ C
-
The host cell this receptor is bound to.
latefinaloverride-getter
-
clone
→ Receptor<
C> -
Returns a shallow, unactivated copy of the current Receptor.
no setterinherited
- hashCode → int
-
Hash code for this receptor.
no setteroverride
- isActivated → bool
-
Indicates whether this receptor is activated.
no setteroverride
- purity → Purity
-
Default effect footprint: Purity.pure. The journal layer populates this for
the built-in operators (
asyncMap→ effectful,fromStream→ effectful,debounce/throttle→ readOnlyExternal); custom receptors that perform external I/O must override it.no setteroverride - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- version → String
-
Default version:
'0.0.0'("unversioned"). User receptors override with a stable string so the replay engine can dispatch by version.no setteroverride
Methods
-
activate(
C cell) → bool -
Activates the receptor by binding it to a cell.
override
-
call(
covariant Pulse incoming) → FutureOr< Pulse?> -
The internal execution entry point for signal propagation and
transformation.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
Equality operator for receptors.
override