Package com.smeup.kokos.sdk.rpgle.caller
Class ProgramCaller
java.lang.Object
com.smeup.kokos.sdk.rpgle.caller.ProgramCaller
ProgramCaller dispatch the runtime to relative program
- Author:
- mattia.bonardi
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionProgramCaller(com.smeup.kokos.sdk.fun.Fun fun, com.smeup.kokos.sdk.model.ExecutionContext context, OutputStream out) ProgramCaller(com.smeup.kokos.sdk.fun.Fun fun, com.smeup.kokos.sdk.model.ExecutionContext context, OutputStream out, com.smeup.kokos.sdk.util.SmeupDataStructurePrinter printer, com.smeup.rpgparser.interpreter.SystemInterface systemInterface) ProgramCaller(com.smeup.kokos.sdk.fun.Fun fun, com.smeup.kokos.sdk.model.ExecutionContext context, OutputStream out, com.smeup.rpgparser.interpreter.SystemInterface systemInterface, com.smeup.kokos.sdk.util.SmeupDataStructurePrinter printer) -
Method Summary
Modifier and TypeMethodDescriptionLinkedHashMap<String, com.smeup.rpgparser.interpreter.Value> call(String programName, LinkedHashMap<String, com.smeup.rpgparser.interpreter.Value> programParams) Dispatch execution to relative program In case of doped program isn't found, assume that the program is an rpgle programLinkedHashMap<String, com.smeup.rpgparser.interpreter.Value> call(String programName, LinkedHashMap<String, com.smeup.rpgparser.interpreter.Value> programParams, Supplier<LinkedHashMap<String, com.smeup.rpgparser.interpreter.Value>> onNotFoundDopedProgram) Dispatch execution to relative programvoidchangeProgramPackage(String programPackage) Change the package of programscom.smeup.rpgparser.execution.DspfConfigcom.smeup.kokos.sdk.model.ExecutionContextcom.smeup.kokos.sdk.fun.FungetFun()kotlin.jvm.functions.Function2<com.smeup.dspfparser.linesclassifier.DSPFRecord, com.smeup.rpgparser.interpreter.RuntimeInterpreterSnapshot, com.smeup.rpgparser.interpreter.OnExfmtResponse> getOut()getRpgProgramHelper(String programName) Return the instance of RpgProgramHelpercom.smeup.kokos.sdk.util.SmeupDataStructurePrinterReturn the instance of current SmeupDataStructurePrintervoidsetDspfConfig(com.smeup.rpgparser.execution.DspfConfig dspfConfig) voidsetFun(com.smeup.kokos.sdk.fun.Fun fun) voidsetOnExfmt(kotlin.jvm.functions.Function2<com.smeup.dspfparser.linesclassifier.DSPFRecord, com.smeup.rpgparser.interpreter.RuntimeInterpreterSnapshot, com.smeup.rpgparser.interpreter.OnExfmtResponse> onExfmt)
-
Field Details
-
DEFAULT_PROGRAM_PACKAGE
- See Also:
-
-
Constructor Details
-
ProgramCaller
public ProgramCaller(com.smeup.kokos.sdk.fun.Fun fun, com.smeup.kokos.sdk.model.ExecutionContext context, OutputStream out) -
ProgramCaller
public ProgramCaller(com.smeup.kokos.sdk.fun.Fun fun, com.smeup.kokos.sdk.model.ExecutionContext context, OutputStream out, com.smeup.rpgparser.interpreter.SystemInterface systemInterface, com.smeup.kokos.sdk.util.SmeupDataStructurePrinter printer) -
ProgramCaller
public ProgramCaller(com.smeup.kokos.sdk.fun.Fun fun, com.smeup.kokos.sdk.model.ExecutionContext context, OutputStream out, com.smeup.kokos.sdk.util.SmeupDataStructurePrinter printer, com.smeup.rpgparser.interpreter.SystemInterface systemInterface)
-
-
Method Details
-
call
public LinkedHashMap<String,com.smeup.rpgparser.interpreter.Value> call(String programName, LinkedHashMap<String, com.smeup.rpgparser.interpreter.Value> programParams, Supplier<LinkedHashMap<String, throws Exceptioncom.smeup.rpgparser.interpreter.Value>> onNotFoundDopedProgram) Dispatch execution to relative program- Parameters:
programName- The name of called programprogramParams- The parameters passed to program- Returns:
- onNotFoundDopedProgram Logic to execute in case of doped program not found. Cannot be null
- Throws:
Exception- in case of error
-
call
public LinkedHashMap<String,com.smeup.rpgparser.interpreter.Value> call(String programName, LinkedHashMap<String, com.smeup.rpgparser.interpreter.Value> programParams) throws ExceptionDispatch execution to relative program In case of doped program isn't found, assume that the program is an rpgle program- Parameters:
programName- The name of called programprogramParams- The parameters passed to program- Throws:
Exception- in case of error
-
getRpgProgramHelper
Return the instance of RpgProgramHelper- Parameters:
programName- program for which you want to get the RpgProgramHelper- Returns:
- the instance of RpgProgramHelper
-
getFun
public com.smeup.kokos.sdk.fun.Fun getFun() -
setFun
public void setFun(com.smeup.kokos.sdk.fun.Fun fun) -
getExecutionContext
public com.smeup.kokos.sdk.model.ExecutionContext getExecutionContext() -
getOut
-
changeProgramPackage
Change the package of programs- Parameters:
programPackage- The new package of programs
-
getSmeupDataStructurePrinter
public com.smeup.kokos.sdk.util.SmeupDataStructurePrinter getSmeupDataStructurePrinter()Return the instance of current SmeupDataStructurePrinter- Returns:
- an instance of SmeupDataStructurePrinter
-
getJaxContext
-
getOnExfmt
public kotlin.jvm.functions.Function2<com.smeup.dspfparser.linesclassifier.DSPFRecord,com.smeup.rpgparser.interpreter.RuntimeInterpreterSnapshot, getOnExfmt()com.smeup.rpgparser.interpreter.OnExfmtResponse> -
setOnExfmt
public void setOnExfmt(kotlin.jvm.functions.Function2<com.smeup.dspfparser.linesclassifier.DSPFRecord, com.smeup.rpgparser.interpreter.RuntimeInterpreterSnapshot, com.smeup.rpgparser.interpreter.OnExfmtResponse> onExfmt) -
getDspfConfig
public com.smeup.rpgparser.execution.DspfConfig getDspfConfig() -
setDspfConfig
public void setDspfConfig(com.smeup.rpgparser.execution.DspfConfig dspfConfig)
-