Class Orchestrator.Executor

  • Enclosing class:
    Orchestrator

    public static class Orchestrator.Executor
    extends java.lang.Object
    Used to load and cache AbstractLoader instances to be used as executors for actions. AbstractLoader instances must be concrete and determine any customizations applied to the script.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CONFIG_KEY  
      static java.lang.String CONTEXT_KEY  
    • Constructor Summary

      Constructors 
      Constructor Description
      Executor()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object executeTask​(com.ibm.dbb.task.configuration.AbstractTaskConfiguration task, java.util.Map<java.lang.String,​java.lang.Object> input)  
      java.lang.Class<?> loadClass​(java.lang.String className)  
      java.lang.Class<?> loadClass​(java.lang.String className, boolean staticLoad)  
      java.lang.Class<?> loadScript​(java.lang.String executor, java.io.File taskFile)
      Loads a script using an executor, loading the executor from file or package if it is not already cached.
      java.lang.Object runClass​(com.ibm.dbb.task.configuration.AbstractTaskConfiguration task, java.util.Map<java.lang.String,​java.lang.Object> input)
      Executes the input compiled groovy or java task.
      java.lang.Object runScript​(com.ibm.dbb.task.configuration.TaskConfiguration task, java.util.Map<java.lang.String,​java.lang.Object> input)  
      void validateTaskSource​(com.ibm.dbb.task.configuration.TaskConfiguration task, AbstractVariables variables, java.lang.String taskName)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • executeTask

        public java.lang.Object executeTask​(com.ibm.dbb.task.configuration.AbstractTaskConfiguration task,
                                            java.util.Map<java.lang.String,​java.lang.Object> input)
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • runClass

        public java.lang.Object runClass​(com.ibm.dbb.task.configuration.AbstractTaskConfiguration task,
                                         java.util.Map<java.lang.String,​java.lang.Object> input)
                                  throws java.lang.Exception
        Executes the input compiled groovy or java task.
        Parameters:
        executor - The executor package name or groovy file to use
        actionFile - The groovy script to execute as an action
        input - the input to the action script, placed into the argMap binding of the groovy script
        Returns:
        the return from the action script
        Throws:
        java.lang.Exception
      • runScript

        public java.lang.Object runScript​(com.ibm.dbb.task.configuration.TaskConfiguration task,
                                          java.util.Map<java.lang.String,​java.lang.Object> input)
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • loadScript

        public java.lang.Class<?> loadScript​(java.lang.String executor,
                                             java.io.File taskFile)
                                      throws ClassSourceException,
                                             BuildException
        Loads a script using an executor, loading the executor from file or package if it is not already cached.
        Parameters:
        executor - The executor package name or groovy file to use
        taskFile - The groovy script to load as a task
        Returns:
        the class of the loaded script
        Throws:
        BuildException
        ClassSourceException
      • loadClass

        public java.lang.Class<?> loadClass​(java.lang.String className)
                                     throws java.lang.ClassNotFoundException
        Throws:
        java.lang.ClassNotFoundException
      • loadClass

        public java.lang.Class<?> loadClass​(java.lang.String className,
                                            boolean staticLoad)
                                     throws java.lang.ClassNotFoundException
        Throws:
        java.lang.ClassNotFoundException