Class TaskRecipe.TaskRecipeComponentVoid<I>

  • Type Parameters:
    I - Input type
    Enclosing class:
    TaskRecipe

    public final class TaskRecipe.TaskRecipeComponentVoid<I>
    extends java.lang.Object
    Represents a partial recipe
    • Method Detail

      • synchronous

        public TaskRecipe.TaskRecipeComponentVoid<I> synchronous​(@NonNull TaskConsumer<I> consumer)
        Add a new synchronous step, consuming the input of the earlier step
        Parameters:
        consumer - Consumer that consumes the input
        Returns:
        New task recipe component
      • asynchronous

        public TaskRecipe.TaskRecipeComponentVoid<I> asynchronous​(@NonNull TaskConsumer<I> consumer)
        Add a new asynchronous step, consuming the input of the earlier step
        Parameters:
        consumer - Consumer that consumes the input
        Returns:
        New task recipe component
      • execute

        public void execute​(@NonNull java.lang.Runnable callback)
        Execute the recipe
        Parameters:
        callback - Callback function
      • execute

        public void execute()
        Execute the recipe