Class CamelJBangMain

java.lang.Object
org.apache.camel.dsl.jbang.core.commands.CamelJBangMain
All Implemented Interfaces:
Callable<Integer>

public class CamelJBangMain extends Object implements Callable<Integer>
  • Constructor Details

    • CamelJBangMain

      public CamelJBangMain()
  • Method Details

    • run

      public static void run(String... args)
    • run

      public static void run(CamelJBangMain main, String... args)
    • quit

      public void quit(int exitCode)
      Finish this main with given exit code. By default, uses system exit to terminate. Subclasses may want to overwrite this exit behavior e.g. during unit tests.
      Parameters:
      exitCode -
    • call

      public Integer call() throws Exception
      Specified by:
      call in interface Callable<Integer>
      Throws:
      Exception
    • getOut

      public Printer getOut()
      Gets the main output printer to write command output.
      Returns:
      the printer.
    • setOut

      public void setOut(Printer out)
      Sets the main output printer.
      Parameters:
      out - the printer to use for command output.
    • withPrinter

      public CamelJBangMain withPrinter(Printer out)
      Uses this printer for writing command output.
      Parameters:
      out - to use with this main.
    • getCommandLine

      public static picocli.CommandLine getCommandLine()