IExecutable class
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 = new 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. [...]
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.
-
correlationId
(optional) transaction id to trace execution through call chain.
-
args
execution arguments.
- Return Future that receives execution result or error.
- 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 -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited