Package org.eclipse.jetty.proxy
Class ProxyServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.eclipse.jetty.proxy.AbstractProxyServlet
-
- org.eclipse.jetty.proxy.ProxyServlet
-
- All Implemented Interfaces:
java.io.Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
- Direct Known Subclasses:
AsyncProxyServlet
,BalancerServlet
,ProxyServlet.Transparent
public class ProxyServlet extends AbstractProxyServlet
Servlet 3.0 asynchronous proxy servlet.
The request processing is asynchronous, but the I/O is blocking.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
ProxyServlet.ProxyInputStreamContentProvider
protected class
ProxyServlet.ProxyResponseListener
static class
ProxyServlet.Transparent
Convenience extension ofProxyServlet
that offers transparent proxy functionalities.-
Nested classes/interfaces inherited from class org.eclipse.jetty.proxy.AbstractProxyServlet
AbstractProxyServlet.TransparentDelegate
-
-
Field Summary
-
Fields inherited from class org.eclipse.jetty.proxy.AbstractProxyServlet
_log, CLIENT_REQUEST_ATTRIBUTE, HOP_HEADERS
-
-
Constructor Summary
Constructors Constructor Description ProxyServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Response.Listener
newProxyResponseListener(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected void
onContinue(javax.servlet.http.HttpServletRequest clientRequest, Request proxyRequest)
protected void
onResponseContent(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Response proxyResponse, byte[] buffer, int offset, int length, Callback callback)
protected ContentProvider
proxyRequestContent(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Request proxyRequest)
protected void
service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
Methods inherited from class org.eclipse.jetty.proxy.AbstractProxyServlet
addProxyHeaders, addViaHeader, addViaHeader, addXForwardedHeaders, clientRequestStatus, copyRequestHeaders, createHttpClient, createLogger, destroy, expects100Continue, filterServerResponseHeader, findConnectionHeaders, getBlackListHosts, getHostHeader, getHttpClient, getRequestId, getTimeout, getViaHost, getWhiteListHosts, hasContent, init, newHttpClient, newProxyRequest, onClientRequestFailure, onProxyResponseFailure, onProxyResponseSuccess, onProxyRewriteFailed, onServerResponseHeaders, proxyResponseStatus, rewriteTarget, sendProxyRequest, sendProxyResponseError, setTimeout, validateDestination
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
-
-
-
-
Method Detail
-
service
protected void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
- Overrides:
service
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
java.io.IOException
-
proxyRequestContent
protected ContentProvider proxyRequestContent(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Request proxyRequest) throws java.io.IOException
- Throws:
java.io.IOException
-
newProxyResponseListener
protected Response.Listener newProxyResponseListener(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
- Specified by:
newProxyResponseListener
in classAbstractProxyServlet
-
onResponseContent
protected void onResponseContent(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Response proxyResponse, byte[] buffer, int offset, int length, Callback callback)
-
onContinue
protected void onContinue(javax.servlet.http.HttpServletRequest clientRequest, Request proxyRequest)
- Overrides:
onContinue
in classAbstractProxyServlet
-
-