Class SimpleCommandWrapper

java.lang.Object
io.permazen.cli.SimpleCommandWrapper
All Implemented Interfaces:
org.dellroad.jct.core.simple.SimpleCommand

public class SimpleCommandWrapper extends Object implements org.dellroad.jct.core.simple.SimpleCommand
Wraps a Permazen Command, making it into a Java Console Toolkit SimpleCommand.
  • Constructor Details

    • SimpleCommandWrapper

      public SimpleCommandWrapper(Command command)
      Constructor.
      Parameters:
      command - wrapped command
      Throws:
      IllegalArgumentException - if command is null
  • Method Details

    • getCommand

      public Command getCommand()
      Get the underlying Command.
      Returns:
      wrapped command
    • getUsage

      public String getUsage(String name)
      Specified by:
      getUsage in interface org.dellroad.jct.core.simple.SimpleCommand
    • getHelpSummary

      public String getHelpSummary(String name)
      Specified by:
      getHelpSummary in interface org.dellroad.jct.core.simple.SimpleCommand
    • getHelpDetail

      public String getHelpDetail(String name)
      Specified by:
      getHelpDetail in interface org.dellroad.jct.core.simple.SimpleCommand
    • execute

      public int execute(org.dellroad.jct.core.ConsoleSession<?,?> consoleSession, String name, List<String> args) throws InterruptedException
      Specified by:
      execute in interface org.dellroad.jct.core.simple.SimpleCommand
      Throws:
      InterruptedException