Class DriverService

    • Field Detail


        protected static final java.time.Duration DEFAULT_TIMEOUT
      • process

        protected CommandLine process
        A reference to the current child process. Will be null whenever this service is not running. Protected by lock.
    • Constructor Detail

      • DriverService

        protected DriverService​( executable,
                                int port,
                                java.time.Duration timeout,
                                java.util.List<java.lang.String> args,
                                java.util.Map<java.lang.String,​java.lang.String> environment)
        executable - The driver executable.
        port - Which port to start the driver server on.
        timeout - Timeout waiting for driver server to start.
        args - The arguments to the launched server.
        environment - The environment for the launched server.
        Throws: - If an I/O error occurs.
    • Method Detail

      • getExecutable

        public java.lang.String getExecutable()
      • setExecutable

        public void setExecutable​(java.lang.String executable)
      • findExePath

        protected static java.lang.String findExePath​(java.lang.String exeName,
                                                      java.lang.String exeProperty)
      • getArgs

        protected java.util.List<java.lang.String> getArgs()
      • getEnvironment

        protected java.util.Map<java.lang.String,​java.lang.String> getEnvironment()
      • getUrl

        protected getUrl​(int port)
      • getDefaultDriverOptions

        protected Capabilities getDefaultDriverOptions()
      • getDriverName

        protected java.lang.String getDriverName()
      • getDriverProperty

        protected java.lang.String getDriverProperty()
      • getDriverExecutable

        protected getDriverExecutable()
      • getUrl

        public getUrl()
        The base URL for the managed driver server.
      • isRunning

        public boolean isRunning()
        Checks whether the driver child process is currently running.
        Whether the driver child process is still running.
      • start

        public void start()
        Starts this service if it is not already running. This method will block until the server has been fully started and is ready to handle commands.
        Throws: - If an error occurs while spawning the child process.
        See Also:
      • getTimeout

        protected java.time.Duration getTimeout()
      • waitUntilAvailable

        protected void waitUntilAvailable()
      • stop

        public void stop()
        Stops this service if it is currently running. This method will attempt to block until the server has been fully shutdown.
        See Also:
      • hasShutdownEndpoint

        protected boolean hasShutdownEndpoint()
      • sendOutputTo

        public void sendOutputTo​( outputStream)
      • getOutputStream

        protected getOutputStream()
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface