public interface

SshCommandFactory

com.atlassian.bitbucket.ssh.command.SshCommandFactory

Class Overview

Describes a factory for parsing commands and creating SshCommand instances to run them.

Summary

Public Methods
@Nonnull Optional<SshCommand> create(SshCommandContext context)
@Deprecated @Nonnull Optional<SshCommand> create(String command, InputStream stdin, OutputStream stdout, OutputStream stderr)
This method is deprecated. in 5.12 from removal in 6.0. Factories should implement create(SshCommandContext) instead.
boolean supports(String command)

Public Methods

@Nonnull public Optional<SshCommand> create (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

@Deprecated @Nonnull public Optional<SshCommand> create (String command, InputStream stdin, OutputStream stdout, OutputStream stderr)

This method is deprecated.
in 5.12 from removal in 6.0. Factories should implement create(SshCommandContext) instead.

Parameters
command the command from the remote client (e.g. "git-upload-pack path/to/repository")
stdin the InputStream for reading from the remote client's stdin stream
stdout the OutputStream for writing to the remote client's stdout stream
stderr the OutputStream for writing to the remote client's stderr stream
Returns

public boolean supports (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