public interface HttpProxyManagerBootstrap<T extends HttpProxyManagerBootstrap> extends ProxyManagerBootstrap<T>
HttpProxyManager. The HttpProxyServer is built using ProxyManagerBootstrap.start(). Sensible
defaults are available for all parameters such that ProxyManagerBootstrap.start() could be called immediately if you wish.| 限定符和类型 | 方法和说明 |
|---|---|
T |
plusActivityTracker(ActivityTracker activityTracker)
Add an
ActivityTracker for tracking activity in this proxy. |
T |
withAddress(InetSocketAddress address)
Listen for incoming connections on the given address.
|
T |
withAllowDuplicateContentLengths(boolean allowDuplicateContentLengths) |
T |
withAllowLocalOnly(boolean allowLocalOnly)
Specify whether or not to only allow local connections.
|
T |
withApplicationName(String applicationName) |
T |
withConnectTimeout(int connectTimeout)
Specify the timeout for connecting to the upstream server on a new connection, in milliseconds.
|
T |
withFiltersSource(HttpFiltersSource filtersSource)
Specify a
HttpFiltersSource to use for filtering requests and/or responses through this proxy. |
T |
withIdleConnectionTimeout(int idleConnectionTimeout)
Specify the timeout after which to disconnect idle connections, in seconds.
|
T |
withInitialBufferSize(int initialBufferSize) |
T |
withMaxChunkSize(int maxChunkSize) |
T |
withMaxHeaderSize(int maxHeaderSize) |
T |
withMaxInitialLineLength(int maxInitialLineLength) |
T |
withName(String name)
Give the server a name (used for naming threads, useful for logging).
|
T |
withNetworkInterface(InetSocketAddress inetSocketAddress)
All outgoing-communication of the proxy-instance is goin' to be routed via the given network-interface
|
T |
withPort(int port)
Listen for incoming connections on the given port.
|
T |
withProxyAlias(String alias)
Sets the alias to use when adding Via headers to incoming and outgoing HTTP messages.
|
T |
withServerResolver(HostResolver serverResolver)
Specify a custom
HostResolver for resolving server addresses. |
T |
withSslEngineSource(SslEngineSource sslEngineSource)
Specify an
SslEngineSource to use for encrypting inbound connections. |
T |
withTcpBackLog(int tcpBackLog) |
T |
withThreadPoolConfiguration(ThreadPoolConfiguration configuration)
Set the configuration parameters for the proxy's thread pools.
|
T |
withThrottling(boolean enabledThrottle,
long readThrottleBytesPerSecond,
long writeThrottleBytesPerSecond,
long throttleCheckIntervalMills,
long maxTrafficDelaySeconds)
Specify the read and/or write bandwidth throttles for this proxy server. 0 indicates not throttling.
|
default T |
withThrottling(long readThrottleBytesPerSecond,
long writeThrottleBytesPerSecond)
Specify the read and/or write bandwidth throttles for this proxy server. 0 indicates not throttling.
|
T |
withTransparent(boolean transparent)
Specify whether or not to run this proxy as a transparent proxy.
|
T |
withTransportProtocol(TransportProtocol transportProtocol)
Specify the
TransportProtocol to use for incoming connections. |
T |
withUdpBackLog(int udpBackLog) |
T |
withValidateHeaders(boolean validateHeaders) |
abort, start, stop, withEventThreadPoolGracefulShutdownAwaitSeconds, withEventThreadPoolGracefulShutdownQuietPeriodSeconds, withEventThreadPoolGracefulShutdownTimeoutSeconds, withGracefulShutdown, withGracefulShutdownAwaitSeconds, withServerGroupT withApplicationName(String applicationName)
withApplicationName 在接口中 ProxyManagerBootstrap<T extends HttpProxyManagerBootstrap>T withName(String name)
ProxyManagerBootstrapGive the server a name (used for naming threads, useful for logging).
withName 在接口中 ProxyManagerBootstrap<T extends HttpProxyManagerBootstrap>name - nameT withTransportProtocol(TransportProtocol transportProtocol)
ProxyManagerBootstrap
Specify the TransportProtocol to use for incoming connections.
Default = TCP
withTransportProtocol 在接口中 ProxyManagerBootstrap<T extends HttpProxyManagerBootstrap>transportProtocol - transport protocolT withAddress(InetSocketAddress address)
ProxyManagerBootstrapListen for incoming connections on the given address.
Default = [bound ip]:8080
withAddress 在接口中 ProxyManagerBootstrap<T extends HttpProxyManagerBootstrap>address - addressT withPort(int port)
ProxyManagerBootstrapListen for incoming connections on the given port.
Default = 8080
withPort 在接口中 ProxyManagerBootstrap<T extends HttpProxyManagerBootstrap>port - portT withSslEngineSource(SslEngineSource sslEngineSource)
ProxyManagerBootstrap
Specify an SslEngineSource to use for encrypting inbound connections.
Default = null
withSslEngineSource 在接口中 ProxyManagerBootstrap<T extends HttpProxyManagerBootstrap>sslEngineSource - SSL engine sourceT withProxyAlias(String alias)
ProxyManagerBootstrapwithProxyAlias 在接口中 ProxyManagerBootstrap<T extends HttpProxyManagerBootstrap>alias - the pseudonym to add to Via headersT withTransparent(boolean transparent)
ProxyManagerBootstrapSpecify whether or not to run this proxy as a transparent proxy.
Default = false
withTransparent 在接口中 ProxyManagerBootstrap<T extends HttpProxyManagerBootstrap>transparent - transparent or notT withTcpBackLog(int tcpBackLog)
withTcpBackLog 在接口中 ProxyManagerBootstrap<T extends HttpProxyManagerBootstrap>T withUdpBackLog(int udpBackLog)
withUdpBackLog 在接口中 ProxyManagerBootstrap<T extends HttpProxyManagerBootstrap>T withIdleConnectionTimeout(int idleConnectionTimeout)
ProxyManagerBootstrapSpecify the timeout after which to disconnect idle connections, in seconds.
Default = 70
withIdleConnectionTimeout 在接口中 ProxyManagerBootstrap<T extends HttpProxyManagerBootstrap>idleConnectionTimeout - idle connection timeout in millisecondsT withConnectTimeout(int connectTimeout)
ProxyManagerBootstrapSpecify the timeout for connecting to the upstream server on a new connection, in milliseconds.
Default = 40000
withConnectTimeout 在接口中 ProxyManagerBootstrap<T extends HttpProxyManagerBootstrap>connectTimeout - connect timeout in millisecondsT withServerResolver(HostResolver serverResolver)
ProxyManagerBootstrapHostResolver for resolving server addresses.withServerResolver 在接口中 ProxyManagerBootstrap<T extends HttpProxyManagerBootstrap>serverResolver - server host resolverT plusActivityTracker(ActivityTracker activityTracker)
ProxyManagerBootstrap
Add an ActivityTracker for tracking activity in this proxy.
plusActivityTracker 在接口中 ProxyManagerBootstrap<T extends HttpProxyManagerBootstrap>activityTracker - activity trackerdefault T withThrottling(long readThrottleBytesPerSecond, long writeThrottleBytesPerSecond)
ProxyManagerBootstrapSpecify the read and/or write bandwidth throttles for this proxy server. 0 indicates not throttling.
withThrottling 在接口中 ProxyManagerBootstrap<T extends HttpProxyManagerBootstrap>readThrottleBytesPerSecond - read BPSwriteThrottleBytesPerSecond - write BPST withThrottling(boolean enabledThrottle, long readThrottleBytesPerSecond, long writeThrottleBytesPerSecond, long throttleCheckIntervalMills, long maxTrafficDelaySeconds)
ProxyManagerBootstrapSpecify the read and/or write bandwidth throttles for this proxy server. 0 indicates not throttling.
withThrottling 在接口中 ProxyManagerBootstrap<T extends HttpProxyManagerBootstrap>enabledThrottle - enables throttlereadThrottleBytesPerSecond - read BPSwriteThrottleBytesPerSecond - write BPSthrottleCheckIntervalMills - check interval in millisecondsmaxTrafficDelaySeconds - throttle delay in secondsT withNetworkInterface(InetSocketAddress inetSocketAddress)
ProxyManagerBootstrapwithNetworkInterface 在接口中 ProxyManagerBootstrap<T extends HttpProxyManagerBootstrap>inetSocketAddress - to be used for outgoing communicationT withThreadPoolConfiguration(ThreadPoolConfiguration configuration)
ProxyManagerBootstrapwithThreadPoolConfiguration 在接口中 ProxyManagerBootstrap<T extends HttpProxyManagerBootstrap>configuration - thread pool configurationT withAllowLocalOnly(boolean allowLocalOnly)
Specify whether or not to only allow local connections.
Default = true
withAllowLocalOnly 在接口中 ProxyManagerBootstrap<T extends HttpProxyManagerBootstrap>allowLocalOnly - whether to allow local access onlyT withFiltersSource(HttpFiltersSource filtersSource)
Specify a HttpFiltersSource to use for filtering requests and/or responses through this proxy.
Default = null
filtersSource - filters sourceT withMaxInitialLineLength(int maxInitialLineLength)
T withMaxHeaderSize(int maxHeaderSize)
T withMaxChunkSize(int maxChunkSize)
T withValidateHeaders(boolean validateHeaders)
T withInitialBufferSize(int initialBufferSize)
T withAllowDuplicateContentLengths(boolean allowDuplicateContentLengths)
Copyright © 2021 Zodiac. All rights reserved.