public abstract class

BaseCommand

extends Object
implements AsyncCommand<T> Command<T>
java.lang.Object
   ↳ com.atlassian.stash.scm.BaseCommand<T>

Class Overview

Wrapper around Atlassian's process utils.

Summary

Protected Constructors
BaseCommand(String binary, String command, Map<StringString> environment, File workingDir, CommandExitHandler exitHandler, CommandInputHandler inputHandler, CommandOutputHandler<T> outputHandler, CommandErrorHandler errorHandler)
Public Methods
@Nonnull AsyncCommand<T> asynchronous()
@Nullable T call()
void setExecutionTimeout(long timeoutInSecs)
void setIdleTimeout(long timeoutInSecs)
@Nonnull Future<T> start()
@Nonnull Command<T> synchronous()
@Nonnull String toString()
Protected Methods
void addArgument(Object... options)
void callExitHandler()
@Nonnull OutputHandler getErrorHandler()
@Nullable InputHandler getInputHandler()
@Nonnull OutputHandler getOutputHandler()
@Nonnull ProcessHandler getProcessHandler()
@Nullable abstract T getResult()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.stash.scm.AsyncCommand
From interface com.atlassian.stash.scm.Command
From interface java.util.concurrent.Callable

Protected Constructors

protected BaseCommand (String binary, String command, Map<StringString> environment, File workingDir, CommandExitHandler exitHandler, CommandInputHandler inputHandler, CommandOutputHandler<T> outputHandler, CommandErrorHandler errorHandler)

Public Methods

@Nonnull public AsyncCommand<T> asynchronous ()

@Nullable public T call ()

public void setExecutionTimeout (long timeoutInSecs)

public void setIdleTimeout (long timeoutInSecs)

@Nonnull public Future<T> start ()

@Nonnull public Command<T> synchronous ()

@Nonnull public String toString ()

Protected Methods

protected void addArgument (Object... options)

protected void callExitHandler ()

@Nonnull protected OutputHandler getErrorHandler ()

@Nullable protected InputHandler getInputHandler ()

@Nonnull protected OutputHandler getOutputHandler ()

@Nonnull protected ProcessHandler getProcessHandler ()

@Nullable protected abstract T getResult ()