org.mockserver.proxy
Class ProxyBuilder

java.lang.Object
  extended by org.mockserver.proxy.ProxyBuilder

public class ProxyBuilder
extends Object

This class should be used to configure the HttpProxy, using this class is the simplest way to create an HttpProxy instance

Author:
jamesdbloom

Constructor Summary
ProxyBuilder()
           
 
Method Summary
 Proxy build()
          Build an instance of the HttpProxy
 ProxyBuilder withDirect(String remoteHost, Integer remotePort)
          Configure a direct proxy that forwards all requests from the localPort to the remoteHost and remotePort
 ProxyBuilder withLocalPort(Integer localPort)
          Configure the local port for the proxy, this will be the same port for all traffic including HTTP, SOCKS, CONNECT and SSL
 ProxyBuilder withStopEventQueue(StopEventQueue stopEventQueue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyBuilder

public ProxyBuilder()
Method Detail

withStopEventQueue

public ProxyBuilder withStopEventQueue(StopEventQueue stopEventQueue)

withLocalPort

public ProxyBuilder withLocalPort(Integer localPort)
Configure the local port for the proxy, this will be the same port for all traffic including HTTP, SOCKS, CONNECT and SSL

Parameters:
localPort - the local port to use

withDirect

public ProxyBuilder withDirect(String remoteHost,
                               Integer remotePort)
Configure a direct proxy that forwards all requests from the localPort to the remoteHost and remotePort

Parameters:
remoteHost - the destination hostname for direct forwarding
remotePort - the destination port for direct forwarding

build

public Proxy build()
Build an instance of the HttpProxy



Copyright © 2017. All rights reserved.