org.browsermob.proxy
Class BrowserMobProxyHandler

java.lang.Object
  extended by org.browsermob.proxy.jetty.http.handler.AbstractHttpHandler
      extended by org.browsermob.proxy.selenium.SeleniumProxyHandler
          extended by org.browsermob.proxy.BrowserMobProxyHandler
All Implemented Interfaces:
Serializable, HttpHandler, LifeCycle

public class BrowserMobProxyHandler
extends SeleniumProxyHandler

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.browsermob.proxy.selenium.SeleniumProxyHandler
SeleniumProxyHandler.SslRelay
 
Field Summary
protected  Set<SeleniumProxyHandler.SslRelay> sslRelays
           
 
Fields inherited from class org.browsermob.proxy.selenium.SeleniumProxyHandler
_allowedConnectPorts, _DontProxyHeaders, _ProxyAuthHeaders, _proxyHostsBlackList, _proxyHostsWhiteList, _ProxySchemes, _tunnelTimeoutMs
 
Constructor Summary
BrowserMobProxyHandler()
           
 
Method Summary
 void adjustListenerBuffers()
           
 void adjustListenerBuffers(int headerBufferMultiplier)
           
 void autoBasicAuthorization(String domain, String username, String password)
           
 void cleanup()
           
protected  SeleniumProxyHandler.SslRelay getSslRelayOrCreateNew(URI uri, InetAddrPort addrPort, HttpServer server)
           
 void handleConnect(String pathInContext, String pathParams, HttpRequest request, HttpResponse response)
           
static void main(String[] args)
           
protected  HttpTunnel newHttpTunnel(HttpRequest httpRequest, HttpResponse httpResponse, InetAddress inetAddress, int i, int i1)
           
protected  long proxyPlainTextRequest(URL url, String pathInContext, String pathParams, HttpRequest request, HttpResponse response)
           
 void remapHost(String source, String target)
           
 void resetListenerBuffers()
           
 void rewriteUrl(String match, String replace)
           
 void setHttpClient(BrowserMobHttpClient httpClient)
           
 void setJettyServer(Server jettyServer)
           
protected  void wireUpSslWithCyberVilliansCA(String host, SeleniumProxyHandler.SslRelay listener)
           
 
Methods inherited from class org.browsermob.proxy.selenium.SeleniumProxyHandler
customizeConnection, customizeConnection, generateSSLCertsForLoggingHosts, getProxyHostsBlackList, getProxyHostsWhiteList, getTunnelTimeoutMs, handle, isAnonymous, isForbidden, isForbidden, isProxied, sendForbid, sendNotFound, setAnonymous, setProxyHostsBlackList, setProxyHostsWhiteList, setShutdownLock, setSslKeystorePath, setTunnelTimeoutMs, shouldInject, start, wireUpSslWithRemoteService
 
Methods inherited from class org.browsermob.proxy.jetty.http.handler.AbstractHttpHandler
getHttpContext, getName, handleTrace, initialize, isStarted, setName, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sslRelays

protected final Set<SeleniumProxyHandler.SslRelay> sslRelays
Constructor Detail

BrowserMobProxyHandler

public BrowserMobProxyHandler()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

handleConnect

public void handleConnect(String pathInContext,
                          String pathParams,
                          HttpRequest request,
                          HttpResponse response)
                   throws HttpException,
                          IOException
Overrides:
handleConnect in class SeleniumProxyHandler
Throws:
HttpException
IOException

wireUpSslWithCyberVilliansCA

protected void wireUpSslWithCyberVilliansCA(String host,
                                            SeleniumProxyHandler.SslRelay listener)
Overrides:
wireUpSslWithCyberVilliansCA in class SeleniumProxyHandler

getSslRelayOrCreateNew

protected SeleniumProxyHandler.SslRelay getSslRelayOrCreateNew(URI uri,
                                                               InetAddrPort addrPort,
                                                               HttpServer server)
                                                        throws Exception
Overrides:
getSslRelayOrCreateNew in class SeleniumProxyHandler
Throws:
Exception

newHttpTunnel

protected HttpTunnel newHttpTunnel(HttpRequest httpRequest,
                                   HttpResponse httpResponse,
                                   InetAddress inetAddress,
                                   int i,
                                   int i1)
                            throws IOException
Overrides:
newHttpTunnel in class SeleniumProxyHandler
Throws:
IOException

proxyPlainTextRequest

protected long proxyPlainTextRequest(URL url,
                                     String pathInContext,
                                     String pathParams,
                                     HttpRequest request,
                                     HttpResponse response)
                              throws IOException
Overrides:
proxyPlainTextRequest in class SeleniumProxyHandler
Throws:
IOException

autoBasicAuthorization

public void autoBasicAuthorization(String domain,
                                   String username,
                                   String password)

rewriteUrl

public void rewriteUrl(String match,
                       String replace)

remapHost

public void remapHost(String source,
                      String target)

setJettyServer

public void setJettyServer(Server jettyServer)

adjustListenerBuffers

public void adjustListenerBuffers(int headerBufferMultiplier)

resetListenerBuffers

public void resetListenerBuffers()

adjustListenerBuffers

public void adjustListenerBuffers()

setHttpClient

public void setHttpClient(BrowserMobHttpClient httpClient)

cleanup

public void cleanup()


Copyright © 2011. All Rights Reserved.