org.openqa.selenium.remote.server
Class DefaultSession
java.lang.Object
org.openqa.selenium.remote.server.DefaultSession
- All Implemented Interfaces:
- Session
public class DefaultSession
- extends java.lang.Object
- implements Session
The default session implementation.
Thread safety notes:
There are basically two different thread types rummaging around in this class:
Container listener threads which deliver requests, and the "executor" thread that
processes each request. This means there is a minefield of thread constraints/guards,
some of which are described in docs for each field.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
createSession
public static Session createSession(DriverFactory factory,
SessionId sessionId,
Capabilities capabilities)
throws java.lang.Exception
- Throws:
java.lang.Exception
updateLastAccessTime
public void updateLastAccessTime()
- Touches the session.
- Specified by:
updateLastAccessTime
in interface Session
isTimedOut
public boolean isTimedOut(int timeout)
- Specified by:
isTimedOut
in interface Session
close
public void close()
- Specified by:
close
in interface Session
execute
public <X> X execute(java.util.concurrent.FutureTask<X> future)
throws java.lang.Exception
- Specified by:
execute
in interface Session
- Throws:
java.lang.Exception
getDriver
public WebDriver getDriver()
- Specified by:
getDriver
in interface Session
getKnownElements
public KnownElements getKnownElements()
- Specified by:
getKnownElements
in interface Session
getCapabilities
public Capabilities getCapabilities()
- Specified by:
getCapabilities
in interface Session
attachScreenshot
public void attachScreenshot(java.lang.String base64EncodedImage)
- Specified by:
attachScreenshot
in interface Session
getAndClearScreenshot
public java.lang.String getAndClearScreenshot()
- Specified by:
getAndClearScreenshot
in interface Session
getSessionId
public SessionId getSessionId()
- Specified by:
getSessionId
in interface Session
Copyright © 2011. All Rights Reserved.