| javax.servlet.http.HttpServlet com.sun.portal.wsrp.consumer.resourceproxy.ResourceProxyServlet
ResourceProxyServlet | public class ResourceProxyServlet extends HttpServlet (Code) | | The ResourceProxyServlet is design to service calls to resources on
the producer side.
It acts very much as a HTTP proxy.
It also contains a set of hooks design to add functionality and simplify
the incremental integration with other products. These hooks provide
means for pre forwarding and post forwarding
of the request.
When forwarding the incoming request to the backend URL it filters out the
following HTTP headers: host, connection, cookie.
When forwarding back the response from the backend URL to the caller response
it filters out the following HTTP header: set-cookie.
If session managment is desired with the incoming requests and backend calls,
it should be implemented in DispatcherHooks.
author: Alejandro Abdelnur |
forwardRequest | protected void forwardRequest(HttpServletRequest req, HttpServletResponse res, URLConnection conn) throws IOException, ServletException(Code) | | Forwards the Servlet's request to the backend URL.
NOTE: We should investigate about using chuncks (byte[]) instead byte by byte.
Parameters: req - the servlet's request. Parameters: res - the servlet's response. Parameters: conn - the URLConnection for the backend URL. exception: ServletException - thrown if there was a problem processing the request. exception: IOException - thrown if there was a problem processing the IO for the request. |
service | public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException(Code) | | It processes GET and POST requests, proxing them to the encoded resource URL doing
rewriting in the response if indicated.
Parameters: req - the servlet's request. Parameters: res - the servlet's response. exception: ServletException - thrown if there was a problem processing the request. exception: IOException - thrown if there was a problem processing the IO for the request. |
setConnectionHeadersIntoResponse | protected void setConnectionHeadersIntoResponse(URLConnection conn, HttpServletResponse res) throws IOException, ServletException(Code) | | Copies the backend URL URLConnection response headers back to the Servlet's response.
It skips the following headers: set-cookie.
Parameters: conn - the URLConnection for the backend URL. Parameters: res - the servlet's response. exception: ServletException - thrown if there was a problem processing the response. exception: IOException - thrown if there was a problem processing the IO for the response. |
setRequestHeadersIntoConnection | protected void setRequestHeadersIntoConnection(HttpServletRequest req, URLConnection conn) throws IOException, ServletException(Code) | | Copies the Servlet's request heards to the URLConnection of the backend URL.
It skips the following headers: host, connection, cookie.
Parameters: req - the servlet's request. Parameters: conn - the URLConnection for the backend URL. exception: ServletException - thrown if there was a problem processing the request. exception: IOException - thrown if there was a problem processing the IO for the request. |
Methods inherited from javax.servlet.http.HttpServlet | protected void doDelete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doHead(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doTrace(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected long getLastModified(HttpServletRequest req)(Code)(Java Doc) protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException(Code)(Java Doc)
|
|
|