Access the behavior's events.
Access the behavior's state.
Static
Optional
dependenciesExplicitly reference other Behaviors as dependencies, ensuring this behavior is destroyed first.
This probably won't be commonly necessary. If it is we can instrument Agent to collect dependencies automatically.
Static
earlyBy default behaviors load lazily as they are accessed. You can set this flag to true to force behaviors to load immediately when the endpoint initializes.
Static
Readonly
idEach behavior implementation has an ID that uniquely identifies the type of behavior. An Endpoint may only have one behavior with the specified ID.
Endpoint instances store each behavior in a property with the same name as the behavior's ID.
EndpointBuilder also uses the ID when replacing behaviors using the with() builder method.
Static
Readonly
schemaDefine logical schema to make passcode and discriminator persistent.
The context in which the behavior operates.
The endpoint's environment.
The session in which the behavior has been invoked.
Static
defaultsDefault state values.
Static
supervisorThe data supervisor for the behavior. The supervisor controls validation and access to behavior data.
Execute logic with elevated privileges.
The provided function executes with privileges escalated to offline mode. This is not commonly necessary.
Elevated logic effectively ignores ACLs so should be used with care.
Note that interactions with the behavior will remain elevated until the synchronous completion of this call. You should only elevate privileges for synchronous logic.
the elevated logic
Protected
callbackCreate a generic callback function that has the same properties as a Reactor.
Like a reactor, the callback's "this" will be bound to an active Behavior instance. Because of this: The reactor MUST be a real JS function - arrow functions will not work!
Behaviors are ephemeral and should not perform initialization in their constructor. They can override this method instead.
This method may be synchronous or asyncronous. If asynchronous, the behavior will not be available for external use until initialization completes.
The server invokes this method when the node is active but not yet commissioned unless you set CommissioningServer.State#enabled to false.
An uncommissioned node is not yet associated with fabrics. It cannot be used until commissioned by a controller.
The default implementation logs the QR code and credentials.
Protected
reactInstall a Reactor.
Important: The reactor MUST be a real JS function - arrow functions will not work!
Static
pairingStatic
setStatic
supportsDoes this behavior support functionality of a specific implementation?
Server behavior related to commissioning.
Updates node state based on commissioning status.