Browse Source

Add an interface for all CommandLaunchers to implement

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270277 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 24 years ago
parent
commit
6575f65c84
1 changed files with 40 additions and 0 deletions
  1. +40
    -0
      proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/CommandLauncher.java

+ 40
- 0
proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/CommandLauncher.java View File

@@ -0,0 +1,40 @@
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.myrmidon.framework.exec;

import java.io.IOException;
import org.apache.myrmidon.api.TaskException;

/**
* This is the interface implemented by objects which are capable of
* lauching a native command. Each different implementation is likely
* to have a different strategy or be restricted to specific platform.
*
* <p>It is expected that the user will get a reference to the
* <code>CommandLauncher</code> most appropriate for their environment.</p>
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public interface CommandLauncher
{
/**
* Execute the specified native command.
*
* @param metaData the native command to execute
* @return the Process launched by the CommandLauncher
* @exception IOException is thrown when the native code can not
* launch the application for some reason. Usually due
* to the command not being fully specified and not in
* the PATH env var.
* @exception TaskException if the command launcher detects that
* it can not execute the native command for some reason.
*/
Process exec( ExecMetaData metaData )
throws IOException, TaskException;
}

Loading…
Cancel
Save