IClosable class abstract

Interface for components that require explicit closure.

For components that require opening as well as closing use IOpenable interface instead.

See IOpenable See Closer

Example

class MyConnector implements ICloseable {
    dynamic _client = null;

    ... // The _client can be lazy created

    Future close(String correlationId){
        if (_client != null) {
            _client.close();
            _client = null;
        }
        return  Future.delayed( Duration());
    }
}
Implementers

Constructors

IClosable()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close(String? correlationId) Future
Closes component and frees used resources.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited