IClosable class
Interface for components that require explicit closure.
For components that require opening as well as closing use IOpenable interface instead.
Example
class MyConnector implements ICloseable {
dynamic _client = null;
... // The _client can be lazy created
Future close(String correlationId){
if (this._client != null) {
this._client.close();
this._client = null;
}
return new Future.delayed(new Duration());
}
}
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
close(
String correlationId) → Future -
- Closes component and frees used resources.
-
- correlationId (optional) transaction id to trace execution through call chain.
- Return Future that receives error or null no errors occured.
- Closes component and frees used resources.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited