LocalNode class abstract

Base Class for responder-side nodes.

Inheritance
Implementers

Constructors

LocalNode(String path)

Properties

attributes Map<String, Object?>
Node Attributes
getter/setter pairinherited
callbacks Map<ValueUpdateCallback, int>
Subscription Callbacks
getter/setter pair
children Map<String, Node>
Node Children Map of Child Name to Child Node
getter/setter pairinherited
configs Map
Node Configs
getter/setter pairinherited
disconnected String?
Disconnected Timestamp
no setter
exists bool
Checks if this node exists. list and subscribe can be called on a node that doesn't exist Other things like set remove, and invoke can only be applied to an existing node.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasSubscriber bool
Checks if this node has a subscriber. Use this for things like polling when you only want to do something if the node is subscribed to.
no setter
lastValueUpdate ValueUpdate?
Gets the last value update of this node.
no setter
listChangeController BroadcastStreamController<String>
Changes to nodes will be added to this controller's stream. See updateList.
no setter
listReady bool
whether the node is ready for returning a list response
no setter
listStream Stream<String>
List Stream. See listChangeController.
no setter
path String
Node Path
final
profile Node?
This node's profile.
getter/setter pairinherited
provider NodeProvider?
Node Provider
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → dynamic
Gets the current value of this node.
no setter
valueReady bool
Is the value ready?
no setter

Methods

addChild(String name, Node node) → void
Adds a child to this node.
inherited
clearValue() → void
forEachAttribute(void callback(String name, Object? value)) → void
inherited
forEachChild(void callback(String name, Node? node)) → void
Iterates over all the children of this node and passes them to the specified callback.
inherited
forEachConfig(void callback(dynamic name, dynamic value)) → void
inherited
get(String name) Object?
Get a property of this node. If name starts with '$', this will fetch a config. If name starts with a '@', this will fetch an attribute. Otherwise this will fetch a child.
inherited
getAttribute(String name) Object?
Get an Attribute
inherited
getChild(String name) Node?
Get a Child Node
inherited
getConfig(String name) Object?
Get a Config
inherited
getDisconnectedListResponse() List
getInvokePermission() int
Gets the invoke permission for this node.
getOverideAttributes(String attr) Object?
same as attributes for local node but different on remote node
inherited
getSetPermission() int
Gets the set permission for this node.
getSimpleMap() Map
Gets a map for the data that will be listed in the parent node's children property.
inherited
invoke(Map params, Responder responder, InvokeResponse response, Node parentNode, [int maxPermission = Permission.CONFIG]) InvokeResponse
Called by the link internals to invoke this node.
load(Map map) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAllListCancel() → void
Callback for when all lists are canceled.
onStartListListen() → void
Callback for when listing this node has started.
overrideListChangeController(BroadcastStreamController<String> controller) → void
removeAttribute(String name, Responder responder, Response? response) Response?
Called by the link internals to remove an attribute from this node.
removeChild(dynamic input) String?
Remove a child from this node. input can be either an instance of Node or a String.
inherited
removeConfig(String name, Responder responder, Response? response) Response?
Called by the link internals to remove a config from this node.
setAttribute(String name, Object value, Responder responder, Response? response) Response?
Called by the link internals to set an attribute on this node.
setConfig(String name, Object value, Responder responder, Response? response) Response?
Called by the link internals to set a config on this node.
setValue(Object value, Responder? responder, Response? response, [int maxPermission = Permission.CONFIG]) Response?
Called by the link internals to set a value of a node.
subscribe(dynamic callback(ValueUpdate update), [int qos = 0]) RespSubscribeListener
Subscribes the given callback to this node.
toString() String
A string representation of this object.
inherited
unsubscribe(ValueUpdateCallback callback) → void
Unsubscribe the given callback from this node.
updateValue(Object? update, {bool force = false}) → void
Updates this node's value to the specified value.

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String name) Object?
Shortcut to get.
operator []=(String name, Object value) → void
Set a config, attribute, or child on this node.