Package org.kie.pmml.api.runtime
Interface PMMLRuntime
-
public interface PMMLRuntime
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddPMMLListener(PMMLListener toAdd)Add the givenPMMLListenerto the currentPMMLRuntimeThat listener, in turn, will be added to anyPMMLContextpassed to theevaluatemethodorg.kie.api.pmml.PMML4Resultevaluate(String modelName, PMMLContext context)Evaluate the model, given the contextSet<PMMLListener>getPMMLListeners()Returns an unmodifiable set of thePMMLListeners registered with the current instanceOptional<PMMLModel>getPMMLModel(String modelName)Returns the model registered with the given model name.List<PMMLModel>getPMMLModels()Returns a list of all models available to this runtimevoidremovePMMLListener(PMMLListener toRemove)Remove the givenPMMLListenerfrom the currentPMMLRuntime.
-
-
-
Method Detail
-
evaluate
org.kie.api.pmml.PMML4Result evaluate(String modelName, PMMLContext context)
Evaluate the model, given the context- Parameters:
modelName- the name of the model to evaluatecontext- the context with all the input variables- Returns:
- the result of the evaluation
-
getPMMLModels
List<PMMLModel> getPMMLModels()
Returns a list of all models available to this runtime- Returns:
- the list of available models. An empty list in case no model is available.
-
getPMMLModel
Optional<PMMLModel> getPMMLModel(String modelName)
Returns the model registered with the given model name.- Parameters:
modelName- the name of the model- Returns:
- the corresponding an
Optionalwith thePMMLModelretrieved, or an empty one if none is registered with the given name.
-
addPMMLListener
void addPMMLListener(PMMLListener toAdd)
Add the givenPMMLListenerto the currentPMMLRuntimeThat listener, in turn, will be added to anyPMMLContextpassed to theevaluatemethod- Parameters:
toAdd-
-
removePMMLListener
void removePMMLListener(PMMLListener toRemove)
Remove the givenPMMLListenerfrom the currentPMMLRuntime. That listener, in turn, will not be added anymore toPMMLContexts passed to theevaluatemethod- Parameters:
toRemove-
-
getPMMLListeners
Set<PMMLListener> getPMMLListeners()
Returns an unmodifiable set of thePMMLListeners registered with the current instance
-
-