Class CPythonFunctionFramework

java.lang.Object
nz.org.riskscape.cpython.CPythonFunctionFramework
All Implemented Interfaces:
nz.org.riskscape.engine.function.FunctionFramework, nz.org.riskscape.engine.Identified

public class CPythonFunctionFramework extends Object implements nz.org.riskscape.engine.function.FunctionFramework

Framework for running a python function natively in CPython (as opposed to JythonFunctionFramework in nz.org.riskscape.jython) which executes the user's python code in Jython).

  • Constructor Details

    • CPythonFunctionFramework

      public CPythonFunctionFramework(CPythonSpawner spawner)
  • Method Details

    • notEnabled

      public static CPythonFunctionFramework notEnabled()
      Returns:
      a special cpython function framework which won't claim .py files and will always return an error on build
    • build

      public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.function.IdentifiedFunction> build(String functionName, nz.org.riskscape.engine.Project project, nz.org.riskscape.engine.bind.BoundParameters bound)
      Specified by:
      build in interface nz.org.riskscape.engine.function.FunctionFramework
    • canBuild

      public boolean canBuild(nz.org.riskscape.engine.Project project, Map<String,List<?>> unbound)
      Specified by:
      canBuild in interface nz.org.riskscape.engine.function.FunctionFramework
    • getPriority

      public int getPriority()
      Specified by:
      getPriority in interface nz.org.riskscape.engine.function.FunctionFramework
    • getId

      public String getId()
      Specified by:
      getId in interface nz.org.riskscape.engine.Identified
    • getParameterSet

      public nz.org.riskscape.engine.bind.JavaParameterSet<nz.org.riskscape.engine.function.MetadataParams> getParameterSet()
      Specified by:
      getParameterSet in interface nz.org.riskscape.engine.function.FunctionFramework