Capability class
An unforgeable object that comes back as equal when passed through other isolates.
Sending a capability object to another isolate, and getting it back, will produce an object that is equal to the original. There is no other way to create objects equal to a capability object.
Capabilities can be used as access guards. An isolate can receive requests for operations from other isolates, but only allow them if the request contains the correct capability object. This allows exposing the same interface to multiple clients, but restricting some operations to only those clients that have also been given the corresponding capability.
Capabilities can be used inside a single isolate, but they have no advantage over just using Object()
to create a unique object, and it offers no real security against other code running in the same isolate.
- Implementers
Constructors
- Capability() factory
- Create a new unforgeable capability object.
Properties
- hashCode → int read-only, inherited
- The hash code for this object. [...]
- runtimeType → Type read-only, inherited
- A representation of the runtime type of the object.
Methods
- noSuchMethod(
Invocation invocation) → dynamic inherited - Invoked when a non-existent method or property is accessed. [...]
- toString(
) → String inherited - A string representation of this object. [...]
Operators
- operator ==(
Object other) → bool inherited - The equality operator. [...]
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-isolate/Capability-class.html