org.openqa.grid.web.servlet.handler
Class LegacySeleniumRequest

java.lang.Object
  extended by javax.servlet.ServletRequestWrapper
      extended by javax.servlet.http.HttpServletRequestWrapper
          extended by org.openqa.grid.web.servlet.handler.SeleniumBasedRequest
              extended by org.openqa.grid.web.servlet.handler.LegacySeleniumRequest
All Implemented Interfaces:
javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest

public class LegacySeleniumRequest
extends SeleniumBasedRequest


Field Summary
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
LegacySeleniumRequest(javax.servlet.http.HttpServletRequest httpServletRequest, Registry registry)
           
 
Method Summary
 Map<String,Object> extractDesiredCapability()
          Parse the request to extract the desiredCapabilities.
 RequestType extractRequestType()
           
 ExternalSessionKey extractSession()
          Extract the session from the request.
 String getNewSessionRequestedCapability(TestSession session)
           
 
Methods inherited from class org.openqa.grid.web.servlet.handler.SeleniumBasedRequest
createFromRequest, getBody, getContentLength, getCreationTime, getDesiredCapabilities, getInputStream, getReader, getRegistry, getRequestProtocol, getRequestType, setBody, setBody, toString
 
Methods inherited from class javax.servlet.http.HttpServletRequestWrapper
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
 
Methods inherited from class javax.servlet.ServletRequestWrapper
getAttribute, getAttributeNames, getCharacterEncoding, getContentType, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding, setRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.servlet.ServletRequest
getAttribute, getAttributeNames, getCharacterEncoding, getContentType, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding
 

Constructor Detail

LegacySeleniumRequest

public LegacySeleniumRequest(javax.servlet.http.HttpServletRequest httpServletRequest,
                             Registry registry)
Method Detail

extractRequestType

public RequestType extractRequestType()
Specified by:
extractRequestType in class SeleniumBasedRequest
Returns:
the type of the request.

extractSession

public ExternalSessionKey extractSession()
Description copied from class: SeleniumBasedRequest
Extract the session from the request. This only works for a request that has a session already assigned. It shouldn't be called for a new session request.

Specified by:
extractSession in class SeleniumBasedRequest
Returns:
the external session id sent by the remote. Null is the session cannot be found.

extractDesiredCapability

public Map<String,Object> extractDesiredCapability()
Description copied from class: SeleniumBasedRequest
Parse the request to extract the desiredCapabilities. For non web driver protocol ( selenium1 ) some mapping will be necessary

Specified by:
extractDesiredCapability in class SeleniumBasedRequest
Returns:
the desired capabilities requested by the client.

getNewSessionRequestedCapability

public String getNewSessionRequestedCapability(TestSession session)
Specified by:
getNewSessionRequestedCapability in class SeleniumBasedRequest


Copyright © 2012. All Rights Reserved.