IExecutable class Null safety

Interface for components that can be called to execute work.

See Executor See INotifiable See Parameters

Example

class EchoComponent implements IExecutable {
    ...
    Future<dynamic> execute(String correlationId, Parameters args)  {
       return Future.delayed(Duration(), (){
           return args.getAsObject('message');
       })
    }
}

var echo =  EchoComponent();
var message = 'Test';
echo.execute('123', Parameters.fromTuples(['message', message])
   .then((result) {
        console.log('Request: ' + message + ' Response: ' + result);
    })
);
Implementers

Constructors

IExecutable()

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

execute(String? correlationId, Parameters args) Future
Executes component with arguments and receives execution result. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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