public abstract static class ACIS.OnExecutionListener
extends java.lang.Object
ACIS.executeNewThread(String, float, WeightSet, OnExecutionListener)
function.Constructor and Description |
---|
OnExecutionListener() |
Modifier and Type | Method and Description |
---|---|
ActionResult |
onActionRun(Action action,
Environment environment,
Sentence sentence,
Parameter[] parameter)
Runs the Action's
Action.ActionMethod with the given parameters. |
MatchResult |
onGetBestResult(MatchResult[] results)
Called when the best result is about to be selected.
|
MatchResult[] |
onMatcherResult(MatchResult[] results)
Called when the matching is completed.
|
public MatchResult[] onMatcherResult(MatchResult[] results)
results
- The matching results. May be of length 0;MatchResult
array (Must not be null
, empty array
instead).public MatchResult onGetBestResult(MatchResult[] results)
super
if not doing the MatchResult
selection yourself.results
- The matching results sorted descending by score. May be of length
0;MatchResult
of which the Action
should be
executed or null
when no best result was found (e.g. in case
of a 0-length results
array).public ActionResult onActionRun(Action action, Environment environment, Sentence sentence, Parameter[] parameter)
Action.ActionMethod
with the given parameters.super
if not running the ActionMethod
yourself.Action.ActionMethod.run(Environment, Sentence, Parameter[])
method in a
try-catch
block.ActionResult
with an ActionResult.ActionResultCode
ActionResult.ActionResultCode.INTERNAL_ERROR
with the Exception
as
message.action
- The Action
.environment
- The Environment
.sentence
- The input Sentence
.parameter
- The parsed Parameter
s.ActionResult
of the execution.