Package org.pipservices3.commons.run
Interface IExecutable
- All Known Subinterfaces:
ICommand
- All Known Implementing Classes:
Command
,InterceptedCommand
public interface IExecutable
Interface for components that can be called to execute work.
### Example ###
class EchoComponent implements IExecutable {
...
public void execute(String correlationId, Parameters args) {
Object result = args.getAsObject("message");
}
}
EchoComponent echo = new EchoComponent();
String message = "Test";
echo.execute("123", Parameters.fromTuples("message", message));
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionexecute
(String correlationId, Parameters args) Executes component with arguments and receives execution result.
-
Method Details
-
execute
Executes component with arguments and receives execution result.- Parameters:
correlationId
- (optional) transaction id to trace execution through call chain.args
- execution arguments.- Returns:
- execution result.
- Throws:
ApplicationException
- when errors occured.
-