Package org.eclipse.jetty.ee10.proxy
Class AsyncProxyServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.eclipse.jetty.ee10.proxy.AbstractProxyServlet
org.eclipse.jetty.ee10.proxy.ProxyServlet
org.eclipse.jetty.ee10.proxy.AsyncProxyServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet
,jakarta.servlet.ServletConfig
,Serializable
- Direct Known Subclasses:
AsyncProxyServlet.Transparent
Servlet 3.1 asynchronous proxy servlet.
Both the request processing and the I/O are asynchronous.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
protected class
static class
Convenience extension ofAsyncProxyServlet
that offers transparent proxy functionalities.Nested classes/interfaces inherited from class org.eclipse.jetty.ee10.proxy.ProxyServlet
ProxyServlet.ProxyInputStreamRequestContent, ProxyServlet.ProxyResponseListener
Nested classes/interfaces inherited from class org.eclipse.jetty.ee10.proxy.AbstractProxyServlet
AbstractProxyServlet.TransparentDelegate
-
Field Summary
Fields inherited from class org.eclipse.jetty.ee10.proxy.AbstractProxyServlet
_log, CLIENT_REQUEST_ATTRIBUTE, HOP_HEADERS
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected jakarta.servlet.ReadListener
newReadListener
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Request proxyRequest, AsyncRequestContent content) protected AsyncProxyServlet.StreamWriter
newWriteListener
(jakarta.servlet.http.HttpServletRequest request, Response proxyResponse) protected void
onResponseContent
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Response proxyResponse, byte[] buffer, int offset, int length, Callback callback) protected Request.Content
proxyRequestContent
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Request proxyRequest) Wraps the client-to-proxy request content in aRequest.Content
for the proxy-to-server request.Methods inherited from class org.eclipse.jetty.ee10.proxy.ProxyServlet
newProxyResponseListener, onContinue, service
Methods inherited from class org.eclipse.jetty.ee10.proxy.AbstractProxyServlet
addProxyHeaders, addViaHeader, addViaHeader, addXForwardedHeaders, clientRequestStatus, copyRequestHeaders, createHttpClient, createLogger, destroy, expects100Continue, filterServerResponseHeader, findConnectionHeaders, getBlackListHosts, getHostHeader, getHttpClient, getRequestId, getTimeout, getViaHost, getWhiteListHosts, hasContent, init, newClientConnector, newHttpClient, newHttpClient, newProxyRequest, onClientRequestFailure, onProxyResponseFailure, onProxyResponseSuccess, onProxyRewriteFailed, onServerResponseHeaders, proxyResponseStatus, rewriteTarget, sendProxyRequest, sendProxyResponseError, setTimeout, validateDestination
Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, init, service
Methods inherited from class jakarta.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log
-
Constructor Details
-
AsyncProxyServlet
public AsyncProxyServlet()
-
-
Method Details
-
proxyRequestContent
protected Request.Content proxyRequestContent(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Request proxyRequest) throws IOException Description copied from class:ProxyServlet
Wraps the client-to-proxy request content in aRequest.Content
for the proxy-to-server request.- Overrides:
proxyRequestContent
in classProxyServlet
- Parameters:
request
- the client-to-proxy requestresponse
- the proxy-to-client responseproxyRequest
- the proxy-to-server request- Returns:
- a proxy-to-server request content
- Throws:
IOException
- if the proxy-to-server request content cannot be created
-
newReadListener
protected jakarta.servlet.ReadListener newReadListener(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Request proxyRequest, AsyncRequestContent content) -
onResponseContent
protected void onResponseContent(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Response proxyResponse, byte[] buffer, int offset, int length, Callback callback) - Overrides:
onResponseContent
in classProxyServlet
-
newWriteListener
protected AsyncProxyServlet.StreamWriter newWriteListener(jakarta.servlet.http.HttpServletRequest request, Response proxyResponse)
-