org.openqa.selenium.remote.server.xdrpc
Class HttpServletRequestProxy

java.lang.Object
  extended by org.openqa.selenium.remote.server.xdrpc.HttpServletRequestProxy
All Implemented Interfaces:
InvocationHandler

public class HttpServletRequestProxy
extends Object
implements InvocationHandler

Serves as a proxy to a HttpServletRequest for a WebDriver command described by a CrossDomainRpc.


Method Summary
static javax.servlet.http.HttpServletRequest createProxy(javax.servlet.http.HttpServletRequest request, CrossDomainRpc crossDomainRpc, String xdrpcPath, String mimeType)
          Creates a new proxy.
 Object invoke(Object proxy, Method method, Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createProxy

public static javax.servlet.http.HttpServletRequest createProxy(javax.servlet.http.HttpServletRequest request,
                                                                CrossDomainRpc crossDomainRpc,
                                                                String xdrpcPath,
                                                                String mimeType)
Creates a new proxy.

Parameters:
request - The request to override with the proxy.
crossDomainRpc - The RPC with the command parameters to patch in.
xdrpcPath - The servlet path for the cross-domain request handler; this path will be stripped from the original request in favor of the RPC path.
mimeType - The mime-type that should be assigned to the proxied request.
Returns:
The new request object.

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable


Copyright © 2012. All Rights Reserved.