In package com.eden.orchid.api.tasks

class com.eden.orchid.api.tasks.OrchidCommand

A Command represents something that can be executed via user-input in an interactive session (such as the "interactive" task or from the admin command bar). Commands are very similar to tasks, but differ in the following ways:

  • Orchid runs a single Task in a session, but multiple Commands may be issued in a session
  • A Task shuts Orchid down after it completes, but a command does not
  • A Task does not have additional parameters passed to it; rather the command-line flags act as the Task options. In contrast, additional parameters may be passed to a command directly, being extracted as an OptionsHolder
  • A Task expects a regular String name, while Commands may be matched against a Regex pattern

Fields

public final key

Constructors

public <init>(kotlin.Int, kotlin.String)

A Command represents something that can be executed via user-input in an interactive session (such as the "interactive" task or from the admin command bar). Commands are very similar to tasks, but differ in the following ways:

  • Orchid runs a single Task in a session, but multiple Commands may be issued in a session
  • A Task shuts Orchid down after it completes, but a command does not
  • A Task does not have additional parameters passed to it; rather the command-line flags act as the Task options. In contrast, additional parameters may be passed to a command directly, being extracted as an OptionsHolder
  • A Task expects a regular String name, while Commands may be matched against a Regex pattern

Parameters:
  • priority: Int
  • key: String

Methods

public abstract parameters(): Array

Parameters:
  • No parameters
public abstract run(kotlin.String): Unit

Parameters:
  • commandName: String