Interface SshCommandFactory


public interface SshCommandFactory
Describes a factory for parsing commands and creating SshCommand instances to run them.
  • Method Details

    • create

      @Nonnull Optional<SshCommand> create(@Nonnull SshCommandContext context)
      Parameters:
      context - context describing the command, which can be used by the factory implementations to determine whether it supports the command or not
      Returns:
      an SshCommand implementing the described command, which will be empty if the command is not supported
      Since:
      5.12
    • supports

      boolean supports(@Nonnull String command)
      Parameters:
      command - the command from the remote client (e.g. "git-upload-pack path/to/repository")
      Returns:
      true if this factory can create an SshCommand for the provided command; otherwise, false to try other factories