S3ICore class
The main communication class to the S3I.
The S3ICore provides access to functions to receive and put the different datatype like Thing and PolicyEntry from/to the directory. (This is subject of change because maybe there will be a directory communicator)
Secondly it provides functions to communicate with the S3I-Config API.
Furthermore it provides access to the Broker and Repository classes.
Constructors
- S3ICore.new(AuthenticationManager authManager, {String directoryUrl = 'https://dir.s3i.vswf.dev/api/2', String configApiUrl = 'https://config.s3i.vswf.dev/'})
- Creates a new instance of S3ICore.
Properties
- authManager → AuthenticationManager
-
The authentication manager used by this instance to get
valid access tokens.
final
- configApiUrl → String
-
The address which is used for all request to the Config-API.
final
- directoryUrl → String
-
The address which is used for all requests to the directory.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createBrokerEndpoint(
String thingId, {bool encrypted = false}) → Future< Endpoint> - Creates a new endpoint (queue with the matching binding) in the S3I-Broker.
-
createEventQueueBinding(
String thingId, String topic, {int queueLength = 0}) → Future< Endpoint> -
Creates a new queue binding to the
eventExchange
in the S3I-Broker. -
deleteConfig(
String path, {Map< String, String> additionalHeaderFields = const <String, String>{}}) → Future<Response> -
Generates an authorized
DELETE
to the Config-API. -
getDirectory(
String path, {Map< String, String> additionalHeaderFields = const <String, String>{}}) → Future<Response> -
Generates an authorized
GET
to the S3I-Directory. -
getPolicy(
String policyId) → Future< PolicyEntry> -
Requests a policy entry (matching the
policyId
) from the S3I-Directory. -
getThing(
String thingId, {FieldQuery? fields}) → Future< Thing> -
Requests a directory thing entry (matching the
thingId
) from the S3I-Directory. -
login(
) → Future< AccessToken> - Returns a valid AccessToken form the authManager.
-
logout(
) → Future< bool> - Returns a valid AccessToken form the authManager.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
postConfig(
String path, {Map< String, String> additionalHeaderFields = const <String, String>{}, required Map<String, dynamic> jsonBody}) → Future<Response> -
Generates an authorized
POST
to the Config-API. -
putDirectory(
String path, {Map< String, String> additionalHeaderFields = const <String, String>{}, required Map<String, dynamic> jsonBody}) → Future<Response> -
Generates an authorized
PUT
to the S3I-Directory. -
putPolicy(
PolicyEntry policy) → Future< void> - Puts a policy entry to the S3I-Directory.
-
putThing(
Thing thing) → Future< void> - Puts a directory thing entry to the S3I-Directory.
-
removeBrokerEndpoint(
String thingId) → Future< void> - Removes an endpoint (queue with the matching binding) from the S3I-Broker.
-
removeEventQueue(
String thingId) → Future< void> - Removes the event endpoint from the S3I-Broker.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited