IClosable class

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. [...]
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. [...]
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