Class ProxyServlet

    • Constructor Detail

      • ProxyServlet

        public ProxyServlet()
    • 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 class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        java.io.IOException
      • proxyRequestContent

        protected Request.Content proxyRequestContent​(javax.servlet.http.HttpServletRequest request,
                                                      javax.servlet.http.HttpServletResponse response,
                                                      Request proxyRequest)
                                               throws java.io.IOException
        Wraps the client-to-proxy request content in a Request.Content for the proxy-to-server request.
        Parameters:
        request - the client-to-proxy request
        response - the proxy-to-client response
        proxyRequest - the proxy-to-server request
        Returns:
        a proxy-to-server request content
        Throws:
        java.io.IOException - if the proxy-to-server request content cannot be created
      • onResponseContent

        protected void onResponseContent​(javax.servlet.http.HttpServletRequest request,
                                         javax.servlet.http.HttpServletResponse response,
                                         Response proxyResponse,
                                         byte[] buffer,
                                         int offset,
                                         int length,
                                         Callback callback)