Class ProxyServerConfiguration
- java.lang.Object
-
- com.github.toolarium.jwebserver.config.ProxyServerConfiguration
-
- All Implemented Interfaces:
IProxyServerConfiguration,java.io.Serializable
public class ProxyServerConfiguration extends java.lang.Object implements IProxyServerConfiguration, java.io.Serializable
Implements theIProxyServerConfiguration.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProxyServerConfiguration()Constructor for ProxyServerConfigurationProxyServerConfiguration(IProxyServerConfiguration proxyServerConfiguration)Constructor for ProxyServerConfiguration
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)intgetConnectionsPerThread()Get the connections per threadintgetMaxRequestTime()Ger the max request timejava.lang.String[]getProxyHostNames()Get the proxy host namesinthashCode()booleanreuseXForwarded()Define if any existing X-Forwarded-For header should be used or should it be overwritten.booleanrewriteHostHeader()Define if the HOST header should be rewritten to use the target host of the call.ProxyServerConfigurationsetConnectionsPerThread(java.lang.Integer connectionsPerThread)Set the connections per threadProxyServerConfigurationsetMaxRequestTime(java.lang.Integer maxRequestTime)Set the max request timeProxyServerConfigurationsetProxyHostNames(java.lang.String proxyHostNameList)Set the proxy host namesProxyServerConfigurationsetProxyHostNames(java.lang.String[] proxyHostNameList)Set the proxy host namesProxyServerConfigurationsetReuseXForwarded(java.lang.Boolean reuseXForwarded)Set the reuse X forwardedProxyServerConfigurationsetRewriteHostHeader(java.lang.Boolean rewriteHostHeader)Set the rewrite host headerjava.lang.StringtoString()
-
-
-
Constructor Detail
-
ProxyServerConfiguration
public ProxyServerConfiguration()
Constructor for ProxyServerConfiguration
-
ProxyServerConfiguration
public ProxyServerConfiguration(IProxyServerConfiguration proxyServerConfiguration)
Constructor for ProxyServerConfiguration- Parameters:
proxyServerConfiguration- the proxy server configuration
-
-
Method Detail
-
rewriteHostHeader
public boolean rewriteHostHeader()
Description copied from interface:IProxyServerConfigurationDefine if the HOST header should be rewritten to use the target host of the call.- Specified by:
rewriteHostHeaderin interfaceIProxyServerConfiguration- Returns:
- true to reqrite the host header
- See Also:
IProxyServerConfiguration.rewriteHostHeader()
-
setRewriteHostHeader
public ProxyServerConfiguration setRewriteHostHeader(java.lang.Boolean rewriteHostHeader)
Set the rewrite host header- Parameters:
rewriteHostHeader- the rewrite host header- Returns:
- this instance
-
reuseXForwarded
public boolean reuseXForwarded()
Description copied from interface:IProxyServerConfigurationDefine if any existing X-Forwarded-For header should be used or should it be overwritten.- Specified by:
reuseXForwardedin interfaceIProxyServerConfiguration- Returns:
- true to reuse
- See Also:
IProxyServerConfiguration.reuseXForwarded()
-
setReuseXForwarded
public ProxyServerConfiguration setReuseXForwarded(java.lang.Boolean reuseXForwarded)
Set the reuse X forwarded- Parameters:
reuseXForwarded- the reuse X forwarded- Returns:
- this instance
-
getMaxRequestTime
public int getMaxRequestTime()
Description copied from interface:IProxyServerConfigurationGer the max request time- Specified by:
getMaxRequestTimein interfaceIProxyServerConfiguration- Returns:
- the max request time
- See Also:
IProxyServerConfiguration.getMaxRequestTime()
-
setMaxRequestTime
public ProxyServerConfiguration setMaxRequestTime(java.lang.Integer maxRequestTime)
Set the max request time- Parameters:
maxRequestTime- the max request time- Returns:
- this instance
-
getConnectionsPerThread
public int getConnectionsPerThread()
Description copied from interface:IProxyServerConfigurationGet the connections per thread- Specified by:
getConnectionsPerThreadin interfaceIProxyServerConfiguration- Returns:
- the connections per thread
- See Also:
IProxyServerConfiguration.getConnectionsPerThread()
-
setConnectionsPerThread
public ProxyServerConfiguration setConnectionsPerThread(java.lang.Integer connectionsPerThread)
Set the connections per thread- Parameters:
connectionsPerThread- the connections per thread- Returns:
- this instance
-
getProxyHostNames
public java.lang.String[] getProxyHostNames()
Description copied from interface:IProxyServerConfigurationGet the proxy host names- Specified by:
getProxyHostNamesin interfaceIProxyServerConfiguration- Returns:
- the proxy host names
- See Also:
IProxyServerConfiguration.getProxyHostNames()
-
setProxyHostNames
public ProxyServerConfiguration setProxyHostNames(java.lang.String proxyHostNameList)
Set the proxy host names- Parameters:
proxyHostNameList- the proxy host names- Returns:
- this instance
-
setProxyHostNames
public ProxyServerConfiguration setProxyHostNames(java.lang.String[] proxyHostNameList)
Set the proxy host names- Parameters:
proxyHostNameList- the proxy host names- Returns:
- this instance
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object- See Also:
Object.equals(java.lang.Object)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
-