core library
Core implementation providing Scripting API implementations, interfaces
for protocol bindings, and the Servient
class which provides the WoT
runtime used for consuming, exposing, and discovering Things.
Classes
- AceCredentials
- Credentials used for the AceSecurityScheme.
- AceSecurityScheme
- Experimental ACE Security Scheme.
- Action
- Class representing an Action Affordance in a Thing Description.
- AdditionalExpectedResponse
- Communication metadata describing the expected response message for the primary response.
- ApiKeyCredentials
- Credentials used for the ApiKeySecurityScheme.
- ApiKeySecurityScheme
-
API key authentication security configuration identified by the Vocabulary
Term
apikey
. - ArrayValue
- A DataSchemaValue object wrapping multiple other DataSchemaValues.
- AugmentedForm
-
A Form augmented with information from its asscociated
_thingDescription
and_interactionAffordance
. - AuthServerRequestCreationHint
- This is sent by an RS as a response to an Unauthorized Resource Request Message to help the sender of the Unauthorized Resource Request Message acquire a valid access token.
- AutoSecurityScheme
-
An automatic security configuration identified by the
vocabulary term
auto
. - BasicCredentials
- Credentials used for the BasicSecurityScheme.
- BasicSecurityScheme
-
Basic Authentication security configuration identified by the Vocabulary
Term
basic
. - BearerCredentials
- Credentials used for the BearerSecurityScheme.
- BearerSecurityScheme
-
Bearer Token security configuration identified by the Vocabulary Term
bearer
. - BooleanValue
- A DataSchemaValue object that wraps a bool.
- ComboSecurityScheme
-
A combination of other security schemes identified by the Vocabulary Term
combo
(i.e., "scheme": "combo"). - ConsumedThing
- Represents a client API to operate a Thing. Belongs to the WoT Consumer conformance class.
- Content
- This class contains binary input or output data and indicates the media type this data is encoded in.
- ContentCodec
- Interface for providing a codec for a specific media type.
- ContentSerdes
- Class providing serializing and deserializing capabilities.
- Credentials
- Base class used for defining credentials for Thing Interactions.
- DataSchema
- Metadata that describes the data format used. It can be used for validation.
-
DataSchemaValue<
T> - Value corresponding to a WoT DataSchema as specified in section 7.1 of the WoT Scripting API specification.
- DataSchemaValueInput
- InteractionInput variant that wraps a DataSchemaValue.
- DigestCredentials
- Credentials used for the DigestSecurityScheme.
- DigestSecurityScheme
-
Digest Access Authentication security configuration identified by the
Vocabulary Term
digest
. - DiscoveryContent
- Content specific for discovery.
- Event
- Class representing an Event Affordance in a Thing Description.
- ExpectedResponse
- Communication metadata describing the expected response message for the primary response.
- ExposedThing
- The ExposedThing interface is the server API to operate the Thing that allows defining request handlers, Property, Action, and Event interactions.
- Form
- Contains the information needed for performing interactions with a Thing.
- IntegerValue
- A DataSchemaValue object that wraps an int.
- InteractionAffordance
- Base class for Interaction Affordances (Properties, Actions, and Events).
- InteractionInput
- The (optional) input for an interaction.
- InteractionOutput
- Exposes the data obtained by Thing interactions.
- Link
-
Represents an element of the
links
array in a Thing Description. - NoSecurityScheme
-
A security configuration corresponding to identified by the Vocabulary Term
nosec
. - NullValue
-
A DataSchemaValue object that wraps a
null
value. - NumberValue
- A DataSchemaValue object that wraps a num.
- OAuth2Credentials
- Credentials used for the OAuth2SecurityScheme.
- OAuth2SecurityScheme
-
OAuth 2.0 authentication security configuration for systems conformant with
RFC 6749, RFC 8252 and (for the device flow) RFC 8628, identified by the
Vocabulary Term
oauth2
. - ObjectValue
- A DataSchemaValue object wrapping a map of DataSchemaValues.
- Property
- Class representing a Property Affordance in a Thing Description.
- ProtocolClient
- Base class for a Protocol Client.
- ProtocolClientFactory
- Base class for a factory that produces ProtocolClients.
- ProtocolServer
- Base class for a Protocol Server.
- PskCredentials
- Credentials used for the PskSecurityScheme.
- PskSecurityScheme
-
Pre-shared key authentication security configuration identified by the
Vocabulary Term
psk
. - SecurityScheme
- Class that contains metadata describing the configuration of a security mechanism.
- Servient
- A software stack that implements the WoT building blocks.
- StreamInput
- InteractionInput variant that wraps a byteStream.
- StringValue
- A DataSchemaValue object that wraps a String.
- Subscription
- Represents a subscription to Property change and Event interactions.
- ThingDescription
- Represents a WoT Thing Description
- ThingDiscovery
- Provides the properties and methods controlling the discovery process.
- ThingDiscoveryProcess
- Provides the properties and methods controlling the discovery process, and returning the results.
- ThingFilter
- Contains the constraints for discovering Things as key-value pairs.
- ThingModel
- Class representing a WoT Thing Model.
- WoT
- Interface for a WoT runtime.
Enums
- DirectoryPayloadFormat
-
Enumeration for specifying the value of the
format
query parameter when using theexploreDirectory
discovery method. - DiscoveryMethod
- Enumeration of possible discovery methods.
- OperationType
- Enumeration for the possible WoT operation types.
- SubscriptionType
- Indicates the type of the subscription.
Extensions
-
ArrayInteractionInputExtension
on List<
Object?> - Extension for simplifying the creation of DataSchemaValueInputs from array values.
- BooleanInteractionInputExtension on bool
- Extension for simplifying the creation of DataSchemaValueInputs from boolean values.
- IntegerInteractionInputExtension on int
- Extension for simplifying the creation of DataSchemaValueInputs from int values.
- NullInteractionInputExtension on Null
-
Extension for simplifying the creation of DataSchemaValueInputs from
null
values. - NumberInteractionInputExtension on num
- Extension for simplifying the creation of DataSchemaValueInputs from num values.
-
ObjectInteractionInputExtension
on Map<
String, Object?> - Extension for simplifying the creation of DataSchemaValueInputs from object values.
- StringInteractionInputExtension on String
- Extension for simplifying the creation of DataSchemaValueInputs from String values.
-
ToThingDescription
on Map<
String, dynamic> - Extension for generating ThingDescriptions from Maps more easily.
Constants
- aceSecuritySchemeName → const String
-
Indicates the
scheme
value for identifying AceSecuritySchemes. - apiKeySecuritySchemeName → const String
-
Indicates the
scheme
value for identifying ApiKeySecuritySchemes. - autoSecuritySchemeName → const String
-
Indicates the
scheme
value for identifying AutoSecuritySchemes. - basicSecuritySchemeName → const String
-
Indicates the
scheme
value for identifying BasicSecuritySchemes. - bearerSecuritySchemeName → const String
-
Indicates the
scheme
value for identifying BearerSecuritySchemes. - comboSecuritySchemeName → const String
-
Indicates the
scheme
value for identifying ComboSecuritySchemes. - defaultMediaType → const String
-
Defines
application/json
as the default content type. - digestSecuritySchemeName → const String
-
Indicates the
scheme
value for identifying DigestSecuritySchemes. - nosecSecuritySchemeName → const String
-
Indicates the
scheme
value for identifying NoSecuritySchemes. - oAuth2SecuritySchemeName → const String
-
Indicates the
scheme
value for identifying OAuth2SecuritySchemes. - pskSecuritySchemeName → const String
-
Indicates the
scheme
value for identifying PskSecuritySchemes.
Properties
- thingDescriptionSchema → JsonSchema
-
JSON Schema definition used for validating Thing Descriptions.
final
Typedefs
-
AceSecurityCallback
= Future<
AceCredentials?> Function(Uri uri, Form? form, AuthServerRequestCreationHint? creationHint, AceCredentials? invalidAceCredentials) -
Function signature for an asynchronous callback for providing client
AceCredentials at runtime, based on an optional
creationHint
given by the Resource Server. This creation hint has to be parsed by the library user. -
ActionHandler
= Future<
void> Function(InteractionOutput params, {Object? data, int? formIndex, Map<String, Object> ? uriVariables}) - A function that is called when an external request for invoking an Action is received and defines what to do with such requests.
-
AsyncClientSecurityCallback<
T extends Credentials> = Future< T?> Function(Uri uri, AugmentedForm? form, T? invalidCredentials) - Function signature for an asynchronous callback for providing client Credentials at runtime.
- ClientPskCallback = PskCredentials? Function(Uri uri, Form? form, String? identityHint)
- Function signature for a synchronous callback for providing client PskCredentials at runtime.
- ContextEntry = ({String? key, String value})
- Type definition for a JSON-LD @context entry.
- ErrorListener = void Function(Exception data)
- User provided callback that is given an argument of type Error and is used for conveying critical and non-critical errors from the Protocol Bindings to applications.
-
EventListenerHandler
= Future<
InteractionInput> Function() - A function that is called when an associated Event is triggered and provides the data to be sent with the Event to subscribers.
-
EventSubscriptionHandler
= Future<
void> Function({Object? data, int? formIndex, Map<String, Object> ? uriVariables}) - A function that is called when an external request for subscribing to an Event is received and defines what to do with such requests.
-
ExposedThingInit
= Map<
String, dynamic> - Dictionary used for the initialization of an exposed Thing.
- InteractionListener = void Function(InteractionOutput data)
- User provided callback that is given an argument of type InteractionOutput and is used for observing Property changes and handling Event notifications.
-
PropertyReadHandler
= Future<
InteractionInput> Function({Object? data, int? formIndex, Map<String, Object> ? uriVariables}) - A function that is called when an external request for reading a Property is received and defines what to do with such requests.
-
PropertyReadMap
= Map<
String, InteractionOutput> - Maps multiple InteractionOutputs to property names.
-
PropertyWriteHandler
= Future<
void> Function(InteractionOutput value, {Object? data, int? formIndex, Map<String, Object> ? uriVariables}) - A function that is called when an external request for writing a Property is received and defines what to do with such requests.
-
PropertyWriteMap
= Map<
String, InteractionInput> - Maps multiple InteractionInputs to property names.
-
ServerSecurityCallback
= Map<
String, Credentials> Function(String id) -
Function signature for a synchronous callback retrieving server
Credentials by Thing
id
at runtime.
Exceptions / Errors
- DartWotException
-
Base class for custom exceptions defined in
dart_wot
. - DiscoveryException
- Custom Exception that is thrown when the discovery process fails.
- NotReadableException
- Indicates that an I/O read operation failed.
- ValidationException
- An Exception that is thrown when the validation of a definition fails.