org.jenkinsci.plugins.darcs.cmd
Class DarcsCommand

java.lang.Object
  extended by org.jenkinsci.plugins.darcs.cmd.DarcsCommand

public class DarcsCommand
extends Object

Abstracts Darcs command.

Author:
Sven Strittmatter

Method Summary
static DarcsCommandBuilder builder(String darcsExe)
          Main entry point to obtain a command builder.
 int execute(hudson.Launcher.ProcStarter proc)
          Executes the command by joining the passed in process starter.
 OutputStream getErr()
          Get output stream which records STDOUT.
 OutputStream getOut()
          Get output stream which records STDOUT.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

builder

public static DarcsCommandBuilder builder(String darcsExe)
Main entry point to obtain a command builder.

Parameters:
darcsExe - name of Darcs executable, e.g. "darcs" or "/usr/local/bin/darcs"
Returns:
always new instance

execute

public int execute(hudson.Launcher.ProcStarter proc)
            throws IOException,
                   InterruptedException
Executes the command by joining the passed in process starter.

Parameters:
proc - used to join the command
Returns:
the return code of the executed command
Throws:
IOException - if there's an error launching/joining a process
InterruptedException - if a thread is waiting, sleeping, or otherwise occupied, and the thread is interrupted, either before or during the activity

getOut

public OutputStream getOut()
Get output stream which records STDOUT.

Returns:
reference to the output stream

getErr

public OutputStream getErr()
Get output stream which records STDOUT.

Returns:
reference to the output stream


Copyright © 2004-2013 weltraumschaf.de. All Rights Reserved.