org.openqa.selenium.internal
Class SocketLock
java.lang.Object
org.openqa.selenium.internal.SocketLock
- All Implemented Interfaces:
- Lock
public class SocketLock
- extends Object
- implements Lock
Implements Lock
via an implementation that uses a well-known
server socket.
- Author:
- [email protected] (Gregory Block)
Method Summary |
void |
lock(long timeoutInMillis)
|
void |
unlock()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
- Constant Field Values
SocketLock
public SocketLock()
- Constructs a new SocketLock using the default port. Attempts to lock the lock will block until
the default port becomes free.
SocketLock
public SocketLock(int lockPort)
- Constructs a new SocketLock. Attempts to lock the lock will attempt to acquire the specified
port number, and wait for it to become free.
- Parameters:
lockPort
- the port number to lock
SocketLock
public SocketLock(InetSocketAddress address)
- Constructs a new SocketLock. Attempts to lock the lock will attempt to acquire the specified
port number, and wait for it to become free.
- Parameters:
address
- The port to lock.
lock
public void lock(long timeoutInMillis)
throws WebDriverException
- Specified by:
lock
in interface Lock
- Throws:
WebDriverException
unlock
public void unlock()
- Specified by:
unlock
in interface Lock
Copyright © 2013. All Rights Reserved.