Package org.eclipse.jetty.proxy
Class AsyncProxyServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.eclipse.jetty.proxy.AbstractProxyServlet
-
- org.eclipse.jetty.proxy.ProxyServlet
-
- org.eclipse.jetty.proxy.AsyncProxyServlet
-
- All Implemented Interfaces:
java.io.Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
- Direct Known Subclasses:
AsyncProxyServlet.Transparent
public class AsyncProxyServlet extends ProxyServlet
Servlet 3.1 asynchronous proxy servlet.
Both the request processing and the I/O are asynchronous.
- See Also:
ProxyServlet
,AsyncMiddleManServlet
,ConnectHandler
, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
AsyncProxyServlet.StreamReader
protected class
AsyncProxyServlet.StreamWriter
static class
AsyncProxyServlet.Transparent
Convenience extension ofAsyncProxyServlet
that offers transparent proxy functionalities.-
Nested classes/interfaces inherited from class org.eclipse.jetty.proxy.ProxyServlet
ProxyServlet.ProxyInputStreamContentProvider, ProxyServlet.ProxyResponseListener
-
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 AsyncProxyServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.servlet.ReadListener
newReadListener(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Request proxyRequest, DeferredContentProvider provider)
protected AsyncProxyServlet.StreamWriter
newWriteListener(javax.servlet.http.HttpServletRequest request, Response proxyResponse)
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)
-
Methods inherited from class org.eclipse.jetty.proxy.ProxyServlet
newProxyResponseListener, onContinue, service
-
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
-
proxyRequestContent
protected ContentProvider proxyRequestContent(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Request proxyRequest) throws java.io.IOException
- Overrides:
proxyRequestContent
in classProxyServlet
- Throws:
java.io.IOException
-
newReadListener
protected javax.servlet.ReadListener newReadListener(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Request proxyRequest, DeferredContentProvider provider)
-
onResponseContent
protected void onResponseContent(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Response proxyResponse, byte[] buffer, int offset, int length, Callback callback)
- Overrides:
onResponseContent
in classProxyServlet
-
newWriteListener
protected AsyncProxyServlet.StreamWriter newWriteListener(javax.servlet.http.HttpServletRequest request, Response proxyResponse)
-
-