Class GenericLoader<T extends Assembler>

    • Constructor Detail

      • GenericLoader

        public GenericLoader​(Class<T> assemblerClass,
                             IntSupplier cacheSizeSupplier)
        Basic constructor for creating a loader.
        Parameters:
        assemblerClass - Class of loaded assembler
        cacheSizeSupplier - Supplier of configured cache size for this assembler Class
    • Method Detail

      • exec

        public abstract void exec​(PipelineData pipelineData,
                                  String name)
                           throws Exception
        Attempts to load and execute the external action that has been set.
        Parameters:
        pipelineData - the Turbine request
        name - the name of the assembler module
        Throws:
        Exception - a generic exception.
      • reload

        public boolean reload()
        Returns whether or not this external action is reload itself. This is in cases where the Next button would be clicked, but since we are checking for that, we would go into an endless loop.
        Returns:
        True if the action is reload.
      • setReload

        public GenericLoader<TsetReload​(boolean reload)
        Sets whether or not this external action is reload itself. This is in cases where the Next button would be clicked, but since we are checking for that, we would go into an endless loop.
        Parameters:
        reload - True if the action must be marked as reload.
        Returns:
        Itself.
      • getBasePackage

        public static String getBasePackage()
        Gets the base package where Turbine should find its default modules.
        Returns:
        A String with the base package name.
      • getPackages

        public static List<StringgetPackages()
        Gets the package list where Turbine should find its modules.
        Returns:
        A List with the package names (including the base package).
      • getAssembler

        public T getAssembler​(String name)
                       throws Exception
        Pulls out an instance of the object by name. Name is just the single name of the object.
        Specified by:
        getAssembler in interface Loader<T extends Assembler>
        Parameters:
        name - Name of object instance.
        Returns:
        An Action with the specified name, or null.
        Throws:
        Exception - a generic exception.
      • getAssembler

        protected T getAssembler​(Class<T> type,
                                 String name)
                          throws Exception
        Pulls out an instance of the object by name. Name is just the single name of the object.
        Parameters:
        type - Type of the assembler.
        name - Name of object instance.
        Returns:
        A Screen with the specified name, or null.
        Throws:
        Exception - a generic exception.