Interface Command

All Known Implementing Classes:
JoinFilesCommand, ListModelsCommand, TaskProcessorCommand, WizardCommand

public interface Command

Base interface for all subcommands in the Älyverkko CLI. Each command must define its name and execution logic.

Commands typically:

  • Parse their own specific arguments
  • Access the global configuration
  • Handle I/O operations

Commands should be stateless and self-contained, using the configuration object for persistent data when needed.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called to carry out the specific subcommand.
     
  • Method Details

    • getCommandName

      String getCommandName()
      Returns:
      the subcommand's name.
    • executeCommand

      void executeCommand(String[] args) throws IOException, InterruptedException
      Called to carry out the specific subcommand. Typically, reads command-line arguments and performs the desired action.
      Parameters:
      args - arguments passed after the subcommand name.
      Throws:
      IOException - if I/O operations fail.
      InterruptedException - if the operation is interrupted.