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.
Non‑obvious
- Flyweight Architecture: It utilizes a record-based storage strategy to pack all pipeline instructions into a single memory block.
- Traceability: Every propagation step is logged to the pulse's metadata, providing full forensic visibility for debugging.
- Thread-Safe Context: Activation pins the receptor to a specific operational perimeter, ensuring state access is always consistent.
- Synchronous Pipeline: The pipeline executes synchronously. For asynchronous execution, use ReceptorAsync.
- Validation Async Support: While the pipeline is synchronous, validation can return a Future<bool> for asynchronous validation checks. This is the only async operation in the call path.
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.
no setteroverride
- 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
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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