NodeConfig class

Implemented types

Constructors

NodeConfig({required String name, String? id, String? uId, Set<NodeCapability> capabilities = const {NodeCapability.participant}, Map<String, dynamic>? metadata})
Creates a new NodeConfig with the given parameters. If id is not provided, an ID based on the hashCode will be used. The id is not guaranteed to be unique, and should be used only for logging and identification purposes. The name is a human-readable name for the node. The capabilities is a set of NodeCapability enum values that define the maximum capabilities of the node. By default, the node is a participant node. The uId is a unique identifier for the node Note: this should generally not be set manually, and should be generated automatically, the argument is there to allow mirroring of existing /found nodes, and maintain their uId.

Properties

capabilities → Set<NodeCapability>
Type of the node. This is a NodeCapability enum value.
final
description → String?
Returns a description of the identity.
no setteroverride
hashCode → int
The hash code for this object.
no setteroverride
id → String
Identifier for the node (for logging and identification purposes). If not provided, the hashCode of the object will be used.
no setteroverride
metadata → Map<String, dynamic>
Returns the metadata associated with this resource.
no setteroverride
name → String
Human-readable name for the node.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
suppliedId → String?
Internal storage for the id, if provided.
final
uId → String
Returns a unique identifier that is guaranteed to be globally unique.
final

Methods

copyWith({String? name, String? id, String? uId, Set<NodeCapability>? capabilities, Map<String, dynamic>? metadata}) → NodeConfig
Creates a copy of the configuration with the given parameters. If a parameter is not provided, the value from the current configuration is used.
override
getMetadata(String key, {dynamic defaultValue}) → dynamic
Returns a specific metadata value by key.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setMetadata(String key, dynamic value) → void
toMap() → Map<String, dynamic>
Converts the configuration to a map representation.
override
toString() → String
A string representation of this object.
override
validate({bool throwOnError = false}) → bool
Validates the configuration.
override

Operators

operator ==(Object other) → bool
The equality operator.
override