org.openqa.selenium.internal
Class SocketLock

java.lang.Object
  extended by 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)

Field Summary
static int DEFAULT_PORT
           
 
Constructor Summary
SocketLock()
          Constructs a new SocketLock using the default port.
SocketLock(InetSocketAddress address)
          Constructs a new SocketLock.
SocketLock(int lockPort)
          Constructs a new SocketLock.
 
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
 

Field Detail

DEFAULT_PORT

public static final int DEFAULT_PORT
See Also:
Constant Field Values
Constructor Detail

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.
Method Detail

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 © 2012. All Rights Reserved.