IExecutable class abstract
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
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
-
execute(
String? correlationId, Parameters args) → Future - Executes component with arguments and receives execution result.
-
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