public class DriverService
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DriverService.Builder<DS extends DriverService,B extends DriverService.Builder<?,?>> |
| Modifier | Constructor and Description |
|---|---|
protected |
DriverService(java.io.File executable,
int port,
com.google.common.collect.ImmutableList<java.lang.String> args,
com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> environment) |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
checkExecutable(java.io.File exe) |
protected static java.io.File |
findExecutable(java.lang.String exeName,
java.lang.String exeProperty,
java.lang.String exeDocs,
java.lang.String exeDownload) |
protected java.io.OutputStream |
getOutputStream() |
java.net.URL |
getUrl() |
protected java.net.URL |
getUrl(int port) |
protected boolean |
hasShutdownEndpoint() |
boolean |
isRunning()
Checks whether the driver child process is currently running.
|
void |
sendOutputTo(java.io.OutputStream outputStream)
Deprecated.
Visibility will be restricted to 'protected' soon.
|
void |
start()
Starts this service if it is not already running.
|
void |
stop()
Stops this service if it is currently running.
|
protected void |
waitUntilAvailable() |
protected DriverService(java.io.File executable,
int port,
com.google.common.collect.ImmutableList<java.lang.String> args,
com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> environment)
throws java.io.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.java.io.IOException - If an I/O error occurs.protected java.net.URL getUrl(int port)
throws java.io.IOException
java.io.IOExceptionpublic java.net.URL getUrl()
protected static java.io.File findExecutable(java.lang.String exeName,
java.lang.String exeProperty,
java.lang.String exeDocs,
java.lang.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 objectjava.lang.IllegalStateException - If the executable not found or cannot be executedprotected static void checkExecutable(java.io.File exe)
public boolean isRunning()
public void start()
throws java.io.IOException
java.io.IOException - If an error occurs while spawning the child process.stop()protected void waitUntilAvailable()
throws java.net.MalformedURLException
java.net.MalformedURLExceptionpublic void stop()
start()protected boolean hasShutdownEndpoint()
@Deprecated public void sendOutputTo(java.io.OutputStream outputStream)
protected java.io.OutputStream getOutputStream()