Package org.littleshoot.proxy
Interface HttpProxyServer
-
- All Known Implementing Classes:
DefaultHttpProxyServer
public interface HttpProxyServerInterface for the top-level proxy server class.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidabort()Stops the server and all related clones immediately, without waiting for traffic to stop.HttpProxyServerBootstrapclone()Clone the existing server, with a port 1 higher and everything else the same.intgetConnectTimeout()Returns the maximum time to wait, in milliseconds, to connect to a server.intgetIdleConnectionTimeout()InetSocketAddressgetListenAddress()Return the address on which this proxy is listening.voidsetConnectTimeout(int connectTimeoutMs)Sets the maximum time to wait, in milliseconds, to connect to a server.voidsetIdleConnectionTimeout(int idleConnectionTimeout)voidsetThrottle(long readThrottleBytesPerSecond, long writeThrottleBytesPerSecond)Set the read/write throttle bandwidths (in bytes/second) for this proxy.voidstop()Stops the server and all related clones.
-
-
-
Method Detail
-
getIdleConnectionTimeout
int getIdleConnectionTimeout()
-
setIdleConnectionTimeout
void setIdleConnectionTimeout(int idleConnectionTimeout)
-
getConnectTimeout
int getConnectTimeout()
Returns the maximum time to wait, in milliseconds, to connect to a server.
-
setConnectTimeout
void setConnectTimeout(int connectTimeoutMs)
Sets the maximum time to wait, in milliseconds, to connect to a server.
-
clone
HttpProxyServerBootstrap clone()
Clone the existing server, with a port 1 higher and everything else the same. If the proxy was started with port 0 (JVM-assigned port), the cloned proxy will also use a JVM-assigned port.
The new server will share event loops with the original server. The event loops will use whatever name was given to the first server in the clone group. The server group will not terminate until the original server and all clones terminate.
- Returns:
- a bootstrap that allows customizing and starting the cloned server
-
stop
void stop()
Stops the server and all related clones. Waits for traffic to stop before shutting down.
-
abort
void abort()
Stops the server and all related clones immediately, without waiting for traffic to stop.
-
getListenAddress
InetSocketAddress getListenAddress()
Return the address on which this proxy is listening.
-
setThrottle
void setThrottle(long readThrottleBytesPerSecond, long writeThrottleBytesPerSecond)Set the read/write throttle bandwidths (in bytes/second) for this proxy.
-
-