org.sonatype.gshell.execute
Interface CommandExecutor

All Known Implementing Classes:
CommandExecutorImpl

public interface CommandExecutor

Provides the ability to execute commands.

Since:
2.0
Author:
Jason Dillon

Method Summary
 Object execute(Shell shell, Object... args)
          Execute a pre-processed command-line.
 Object execute(Shell shell, String line)
          Execute a command-line, parsing out valid recognized syntax.
 Object execute(Shell shell, String command, Object[] args)
          Execute command name/path with the given arguments.
 

Method Detail

execute

Object execute(Shell shell,
               String line)
               throws Exception
Execute a command-line, parsing out valid recognized syntax.

Parameters:
shell - The executing shell.
line - Raw command-line to parse and execute.
Returns:
Command execution result.
Throws:
Exception - Command-line execution failed.

execute

Object execute(Shell shell,
               String command,
               Object[] args)
               throws Exception
Execute command name/path with the given arguments.

Parameters:
shell - The executing shell.
command - Name of the command/path to execute.
args - Command arguments.
Returns:
Command execution result.
Throws:
Exception - Command-line execution failed.

execute

Object execute(Shell shell,
               Object... args)
               throws Exception
Execute a pre-processed command-line.

Parameters:
shell - The executing shell.
args - Command arguments, first argument is expected to be the command/path to execute.
Returns:
Command execution result.
Throws:
Exception - Command-line execution failed.


Copyright © 2008-2011 Sonatype. All Rights Reserved.