hudson.plugins.clearcase
Interface ClearToolLauncher

All Known Implementing Classes:
HudsonClearToolLauncher

public interface ClearToolLauncher

Interface to hide the Hudson launch parts so other parts can mock the actual launch.

Author:
Erik Ramfelt

Method Summary
 java.lang.String getCmdString(java.lang.String[] cmd)
           
 hudson.Launcher getLauncher()
           
 hudson.model.TaskListener getListener()
          Returns a task listener for a hudson job
 hudson.FilePath getWorkspace()
          Returns the workspace file path for a hudson job
 boolean run(java.lang.String[] cmd, hudson.FilePath execPath)
          Launches a cleartool command with arguments.
 boolean run(java.lang.String[] cmd, java.io.InputStream in, java.io.OutputStream out, hudson.FilePath execPath)
          Launches a cleartool command with arguments.
 boolean run(java.lang.String[] cmd, java.io.InputStream in, java.io.OutputStream out, hudson.FilePath execPath, boolean logCommand)
          Launches a cleartool command with arguments.
 

Method Detail

run

boolean run(java.lang.String[] cmd,
            hudson.FilePath execPath)
            throws java.io.IOException,
                   java.lang.InterruptedException
Launches a cleartool command with arguments.

Parameters:
cmd - the command to launch using the clear tool executable
filePath -
Returns:
execPath optional, the path where the command should be launched
Throws:
java.io.IOException
java.lang.InterruptedException

run

boolean run(java.lang.String[] cmd,
            java.io.InputStream in,
            java.io.OutputStream out,
            hudson.FilePath execPath)
            throws java.io.IOException,
                   java.lang.InterruptedException
Launches a cleartool command with arguments.

Parameters:
cmd - the command to launch using the clear tool executable
in - optional, if the command should be able to receive input
out - optional, can be used to gather the output stream
execPath - optional, the path where the command should be launched
Returns:
true if the command was successful, false otherwise
Throws:
java.io.IOException
java.lang.InterruptedException

run

boolean run(java.lang.String[] cmd,
            java.io.InputStream in,
            java.io.OutputStream out,
            hudson.FilePath execPath,
            boolean logCommand)
            throws java.io.IOException,
                   java.lang.InterruptedException
Launches a cleartool command with arguments.

Parameters:
cmd - the command to launch using the clear tool executable
in - optional, if the command should be able to receive input
out - optional, can be used to gather the output stream
execPath - optional, the path where the command should be launched
logCommand - optional, log the command itself
Returns:
true if the command was successful, false otherwise
Throws:
java.io.IOException
java.lang.InterruptedException

getListener

hudson.model.TaskListener getListener()
Returns a task listener for a hudson job

Returns:
a task listener

getWorkspace

hudson.FilePath getWorkspace()
Returns the workspace file path for a hudson job

Returns:
the workspace file path

getLauncher

hudson.Launcher getLauncher()
Returns:
the Hudsonlauncher

getCmdString

java.lang.String getCmdString(java.lang.String[] cmd)


Copyright © 2011. All Rights Reserved.