/*
 * Copyright (c) 2004-2017, by Alex Leigh.
 * All rights reserved.
 *
 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE
 * The copyright notice above does not evidence any
 * actual or intended publication of such source code.
 */

package lc.mecha.exec;

import java.util.List;

/**
 * Classes implementing this interface are capable of running processes on local or remote systems and capturing
 * their results.
 *
 * @author Alex Leigh
 */
public interface ProcessExecutor extends AutoCloseable {
    /**
     * Asynchronously start a new process and return a results object to the caller.
     */
    ProcessExecution execute(String cmd, List<String> args) throws Exception;

    /**
     * Asynchronously start a new process and return a results object to the caller.
     */
    ProcessExecution execute(String cmd, String args[]) throws Exception;
}