public class DriverService extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DriverService.Builder<DS extends DriverService,B extends DriverService.Builder> |
| Modifier | Constructor and Description |
|---|---|
protected |
DriverService(File executable,
int port,
com.google.common.collect.ImmutableList<String> args,
com.google.common.collect.ImmutableMap<String,String> environment) |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
checkExecutable(File exe) |
protected static File |
findExecutable(String exeName,
String exeProperty,
String exeDocs,
String exeDownload) |
URL |
getUrl() |
boolean |
isRunning()
Checks whether the driver child process is currently running.
|
void |
start()
Starts this service if it is not already running.
|
void |
stop()
Stops this service is it is currently running.
|
protected DriverService(File executable, int port, com.google.common.collect.ImmutableList<String> args, com.google.common.collect.ImmutableMap<String,String> environment) throws IOException
executable - The driver executable.port - Which port to start the driver server on.args - The arguments to the launched server.environment - The environment for the launched server.IOException - If an I/O error occurs.public URL getUrl()
protected static File findExecutable(String exeName, String exeProperty, String exeDocs, String exeDownload)
exeName - Name of the executable file to look for in PATHexeProperty - Name of a system property that specifies the path to the executable fileexeDocs - The link to the driver documentation pageexeDownload - The link to the driver download pageFile objectIllegalStateException - If the executable not found or cannot be executedprotected static void checkExecutable(File exe)
public boolean isRunning()
public void start()
throws IOException
IOException - If an error occurs while spawning the child process.stop()public void stop()
start()Copyright © 2015. All rights reserved.