public class SimpleReverseProxyFilter extends GenericReverseProxyFilter
Modifier and Type | Field and Description |
---|---|
static String |
MAPPINGS_PARAM_NAME
Reverse proxy mapping initialization parameter name.
|
Constructor and Description |
---|
SimpleReverseProxyFilter()
Zero-argument default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected org.apache.http.impl.client.HttpClientBuilder |
createHttpClientBuilder()
Creates
HttpClientBuilder instance. |
protected ProxyProcessingChain |
createProxyServiceCommand()
#init(ServletConfig) method invokes this method to
create the root reverse proxy processing chain (ProxyProcessingChain ). |
protected org.apache.http.conn.socket.LayeredConnectionSocketFactory |
createSslSocketFactory()
Creates the default internal SSL Socket Connection Factory (
LayeredConnectionSocketFactory ). |
void |
destroy()
Disposes all the
Command s in the root reverse proxy processing chain. |
org.apache.http.conn.ssl.X509HostnameVerifier |
getHostnameVerifier()
Returns the internal SSL Hostname Verifier.
|
org.apache.http.impl.client.HttpClientBuilder |
getHttpClientBuilder()
Returns the internal
HttpClientBuilder instance. |
HttpClientContextBuilder |
getHttpClientContextBuilder()
Returns the internal
HttpClientContextBuilder instance. |
ProxyMappingRegistry |
getProxyMappingRegistry()
Returns the internal
ProxyMappingRegistry instance. |
org.apache.http.conn.socket.LayeredConnectionSocketFactory |
getSslSocketFactory()
Returns the internal SSL Socket Connection Factory (
LayeredConnectionSocketFactory ). |
void |
init(javax.servlet.FilterConfig filterConfig)
Creates the root reverse proxy processing chain instance,
and initializes all the
Command s inside the chain. |
protected void |
initHostnameVerifier(javax.servlet.FilterConfig filterConfig)
Initializes SSL hostnameVerifier (type of
X509HostnameVerifier )
from the init parameter, "ssl-hostname-verifier". |
void |
setHostnameVerifier(org.apache.http.conn.ssl.X509HostnameVerifier hostnameVerifier)
Sets the internal SSL Hostname Verifier.
|
void |
setHttpClientBuilder(org.apache.http.impl.client.HttpClientBuilder httpClientBuilder)
Sets the internal
HttpClientBuilder instance. |
void |
setHttpClientContextBuilder(HttpClientContextBuilder httpClientContextBuilder)
Sets the internal
HttpClientContextBuilder instance. |
void |
setProxyMappingRegistry(ProxyMappingRegistry proxyMappingRegistry)
Sets the internal
ProxyMappingRegistry instance. |
void |
setSslSocketFactory(org.apache.http.conn.socket.LayeredConnectionSocketFactory sslSocketFactory)
Sets the internal SSL Socket Connection Factory (
LayeredConnectionSocketFactory ). |
doFilter, getFilterConfig, getFilterPath, getProxyService, getRequestBasePath, setProxyService
public static final String MAPPINGS_PARAM_NAME
public SimpleReverseProxyFilter()
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
Command
s inside the chain.init
in interface javax.servlet.Filter
init
in class GenericReverseProxyFilter
javax.servlet.ServletException
protected void initHostnameVerifier(javax.servlet.FilterConfig filterConfig)
X509HostnameVerifier
)
from the init parameter, "ssl-hostname-verifier".
The init parameter can be any of "ALLOW_ALL_HOSTNAME_VERIFIER", "BROWSER_COMPATIBLE_HOSTNAME_VERIFIER" or "STRICT_HOSTNAME_VERIFIER", case-insensitively. The default value is "BROWSER_COMPATIBLE_HOSTNAME_VERIFIER".
filterConfig
- public ProxyMappingRegistry getProxyMappingRegistry()
ProxyMappingRegistry
instance.public void setProxyMappingRegistry(ProxyMappingRegistry proxyMappingRegistry)
ProxyMappingRegistry
instance.proxyMappingRegistry
- public org.apache.http.impl.client.HttpClientBuilder getHttpClientBuilder()
HttpClientBuilder
instance.public void setHttpClientBuilder(org.apache.http.impl.client.HttpClientBuilder httpClientBuilder)
HttpClientBuilder
instance.httpClientBuilder
- public HttpClientContextBuilder getHttpClientContextBuilder()
HttpClientContextBuilder
instance.public void setHttpClientContextBuilder(HttpClientContextBuilder httpClientContextBuilder)
HttpClientContextBuilder
instance.httpClientContextBuilder
- public org.apache.http.conn.socket.LayeredConnectionSocketFactory getSslSocketFactory()
LayeredConnectionSocketFactory
).
If not set, it invokes createSslSocketFactory()
to create a default one.public void setSslSocketFactory(org.apache.http.conn.socket.LayeredConnectionSocketFactory sslSocketFactory)
LayeredConnectionSocketFactory
).sslSocketFactory
- public org.apache.http.conn.ssl.X509HostnameVerifier getHostnameVerifier()
public void setHostnameVerifier(org.apache.http.conn.ssl.X509HostnameVerifier hostnameVerifier)
hostnameVerifier
- public void destroy()
Command
s in the root reverse proxy processing chain.destroy
in interface javax.servlet.Filter
destroy
in class GenericReverseProxyFilter
protected ProxyProcessingChain createProxyServiceCommand()
#init(ServletConfig)
method invokes this method to
create the root reverse proxy processing chain (ProxyProcessingChain
).protected org.apache.http.impl.client.HttpClientBuilder createHttpClientBuilder()
HttpClientBuilder
instance.
This method is invoked by getHttpClientBuilder()
if an HttpClientBuilder
instance was not set before.protected org.apache.http.conn.socket.LayeredConnectionSocketFactory createSslSocketFactory()
LayeredConnectionSocketFactory
).Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.