public class SimpleReverseProxyServlet extends GenericReverseProxyServlet
| Modifier and Type | Field and Description |
|---|---|
static String |
MAPPINGS_PARAM_NAME
Reverse proxy mapping initialization parameter name.
|
| Constructor and Description |
|---|
SimpleReverseProxyServlet()
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
Commands 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.ServletConfig servletConfig)
Creates the root reverse proxy processing chain instance,
and initializes all the
Commands inside the chain. |
protected void |
initHostnameVerifier(javax.servlet.ServletConfig servletConfig)
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). |
getProxyService, isAllowedHttpMethod, service, setProxyServicedoDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, servicepublic static final String MAPPINGS_PARAM_NAME
public SimpleReverseProxyServlet()
public void init(javax.servlet.ServletConfig servletConfig)
throws javax.servlet.ServletException
Commands inside the chain.init in interface javax.servlet.Servletinit in class javax.servlet.GenericServletjavax.servlet.ServletExceptionprotected void initHostnameVerifier(javax.servlet.ServletConfig servletConfig)
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".
servletConfig - 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()
Commands in the root reverse proxy processing chain.destroy in interface javax.servlet.Servletdestroy in class javax.servlet.GenericServletprotected 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.