org.mockserver.proxy.direct
Class DirectProxy

java.lang.Object
  extended by org.mockserver.proxy.direct.DirectProxy
All Implemented Interfaces:
Proxy, Stoppable

public class DirectProxy
extends Object
implements Proxy

This class should not be constructed directly instead use HttpProxyBuilder to build and configure this class

Author:
jamesdbloom
See Also:
ProxyBuilder

Field Summary
 
Fields inherited from interface org.mockserver.proxy.Proxy
HTTP_CONNECT_SOCKET, HTTP_PROXY, REMOTE_SOCKET, REQUEST_LOG_FILTER, REQUEST_RESPONSE_LOG_FILTER
 
Constructor Summary
DirectProxy(Integer localPort, String remoteHost, Integer remotePort)
          Start the instance using the ports provided
 
Method Summary
 Integer getLocalPort()
           
 InetSocketAddress getRemoteAddress()
           
 boolean isRunning()
           
 Future<?> stop()
           
 DirectProxy withStopEventQueue(StopEventQueue stopEventQueue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectProxy

public DirectProxy(Integer localPort,
                   String remoteHost,
                   Integer remotePort)
Start the instance using the ports provided

Parameters:
localPort - the local port to expose
remoteHost - the hostname of the remote server to connect to
remotePort - the port of the remote server to connect to
Method Detail

stop

public Future<?> stop()
Specified by:
stop in interface Stoppable

withStopEventQueue

public DirectProxy withStopEventQueue(StopEventQueue stopEventQueue)

isRunning

public boolean isRunning()
Specified by:
isRunning in interface Proxy

getLocalPort

public Integer getLocalPort()

getRemoteAddress

public InetSocketAddress getRemoteAddress()


Copyright © 2017. All rights reserved.