pub trait ForesterRemoteAction {
// Required method
fn tick(&self, request: RemoteActionRequest) -> TickResult;
}Expand description
Describes the contract for the remote action that is expected by the Forester instance The remote action is a remote implementation of the action node in the tree.
Therefore the implementation of the remote action should be integrated to the http api that is provided on the other side.
§Example
Having the following b-tree:
root main sequence {
remote_action(1,2,3)
}
impl remote_action(a:num, b:num, c:num);
Register the action in the Forester instance:
fn build_forester(mut fb: ForesterBuilder){
...
let action = RemoteHttpAction::new("http://localhost:10000/remote_action/".to_string());
fb.register_remote_action("remote_action", action);
...
}
Thus, now we need to implement
the remote action in the http api: http://localhost:10000/remote_action/
that will be called by the Forester instance.