public abstract static class DriverService.Builder<DS extends DriverService,B extends DriverService.Builder> extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
DS |
build()
Creates a new service to manage the driver server.
|
protected abstract com.google.common.collect.ImmutableList<String> |
createArgs() |
protected abstract DS |
createDriverService(File exe,
int port,
com.google.common.collect.ImmutableList<String> args,
com.google.common.collect.ImmutableMap<String,String> environment) |
protected abstract File |
findDefaultExecutable() |
protected File |
getLogFile() |
protected int |
getPort() |
B |
usingAnyFreePort()
Configures the driver server to start on any available port.
|
B |
usingDriverExecutable(File file)
Sets which driver executable the builder will use.
|
B |
usingPort(int port)
Sets which port the driver server should be started on.
|
B |
withEnvironment(Map<String,String> environment)
Defines the environment for the launched driver server.
|
B |
withLogFile(File logFile)
Configures the driver server to write log to the given file.
|
public B usingDriverExecutable(File file)
file
- The executable to use.public B usingPort(int port)
port
- The port to use; must be non-negative.protected int getPort()
public B usingAnyFreePort()
@Beta public B withEnvironment(Map<String,String> environment)
environment
- A map of the environment variables to launch the
server with.public B withLogFile(File logFile)
logFile
- A file to write log to.protected File getLogFile()
public DS build()
protected abstract File findDefaultExecutable()
protected abstract com.google.common.collect.ImmutableList<String> createArgs()
Copyright © 2015. All rights reserved.