org.apache.maven.plugin.surefire.booterclient
Class ForkConfiguration

java.lang.Object
  extended by org.apache.maven.plugin.surefire.booterclient.ForkConfiguration

public class ForkConfiguration
extends Object

Configuration for forking tests.

Author:
Brett Porter, Kenney Westerhof, Kristian Rosenvold

Field Summary
static String FORK_ALWAYS
           
static String FORK_NEVER
           
static String FORK_ONCE
           
static String FORK_PERTHREAD
           
 
Constructor Summary
ForkConfiguration(Classpath bootClasspathConfiguration, File tmpDir, String debugLine, String jvmExecutable, File workingDirectory, String argLine, Map<String,String> environmentVariables, boolean debugEnabled, int forkCount, boolean reuseForks)
           
 
Method Summary
 OutputStreamFlushableCommandline createCommandLine(List<String> classPath, StartupConfiguration startupConfiguration, int threadNumber)
           
 Classpath getBootClasspath()
           
 String getDebugLine()
           
static String getEffectiveForkMode(String forkMode)
           
 int getForkCount()
           
 File getTempDirectory()
           
 boolean isDebug()
           
 boolean isReuseForks()
           
 String stripNewLines(String argline)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORK_ONCE

public static final String FORK_ONCE
See Also:
Constant Field Values

FORK_ALWAYS

public static final String FORK_ALWAYS
See Also:
Constant Field Values

FORK_NEVER

public static final String FORK_NEVER
See Also:
Constant Field Values

FORK_PERTHREAD

public static final String FORK_PERTHREAD
See Also:
Constant Field Values
Constructor Detail

ForkConfiguration

public ForkConfiguration(Classpath bootClasspathConfiguration,
                         File tmpDir,
                         String debugLine,
                         String jvmExecutable,
                         File workingDirectory,
                         String argLine,
                         Map<String,String> environmentVariables,
                         boolean debugEnabled,
                         int forkCount,
                         boolean reuseForks)
Method Detail

getBootClasspath

public Classpath getBootClasspath()

getEffectiveForkMode

public static String getEffectiveForkMode(String forkMode)

createCommandLine

public OutputStreamFlushableCommandline createCommandLine(List<String> classPath,
                                                          StartupConfiguration startupConfiguration,
                                                          int threadNumber)
                                                   throws SurefireBooterForkException
Parameters:
classPath - cla the classpath arguments
startupConfiguration - The startup configuration
threadNumber - the thread number, to be the replacement in the argLine @return A commandline
Throws:
SurefireBooterForkException - when unable to perform the fork

isDebug

public boolean isDebug()

stripNewLines

public String stripNewLines(String argline)

getDebugLine

public String getDebugLine()

getTempDirectory

public File getTempDirectory()

getForkCount

public int getForkCount()

isReuseForks

public boolean isReuseForks()


Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.