Class ProgramCaller

java.lang.Object
com.smeup.kokos.sdk.rpgle.caller.ProgramCaller

public class ProgramCaller extends Object
ProgramCaller dispatch the runtime to relative program
Author:
mattia.bonardi
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProgramCaller(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 Type
    Method
    Description
    LinkedHashMap<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 program
    LinkedHashMap<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 program
    void
    changeProgramPackage(String programPackage)
    Change the package of programs
    com.smeup.rpgparser.execution.DspfConfig
     
    com.smeup.kokos.sdk.model.ExecutionContext
     
    com.smeup.kokos.sdk.fun.Fun
     
     
    kotlin.jvm.functions.Function2<com.smeup.dspfparser.linesclassifier.DSPFRecord,com.smeup.rpgparser.interpreter.RuntimeInterpreterSnapshot,com.smeup.rpgparser.interpreter.OnExfmtResponse>
     
     
    Return the instance of RpgProgramHelper
    com.smeup.kokos.sdk.util.SmeupDataStructurePrinter
    Return the instance of current SmeupDataStructurePrinter
    void
    setDspfConfig(com.smeup.rpgparser.execution.DspfConfig dspfConfig)
     
    void
    setFun(com.smeup.kokos.sdk.fun.Fun fun)
     
    void
    setOnExfmt(kotlin.jvm.functions.Function2<com.smeup.dspfparser.linesclassifier.DSPFRecord,com.smeup.rpgparser.interpreter.RuntimeInterpreterSnapshot,com.smeup.rpgparser.interpreter.OnExfmtResponse> onExfmt)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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,com.smeup.rpgparser.interpreter.Value>> onNotFoundDopedProgram) throws Exception
      Dispatch execution to relative program
      Parameters:
      programName - The name of called program
      programParams - 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 Exception
      Dispatch 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 program
      programParams - The parameters passed to program
      Throws:
      Exception - in case of error
    • getRpgProgramHelper

      public RpgProgramHelper getRpgProgramHelper(String programName)
      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

      public OutputStream getOut()
    • changeProgramPackage

      public void changeProgramPackage(String programPackage)
      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

      public JaxContext getJaxContext()
    • getOnExfmt

      public kotlin.jvm.functions.Function2<com.smeup.dspfparser.linesclassifier.DSPFRecord,com.smeup.rpgparser.interpreter.RuntimeInterpreterSnapshot,com.smeup.rpgparser.interpreter.OnExfmtResponse> getOnExfmt()
    • 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)