Class sun.server.http.ProxyServlet
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.server.http.ProxyServlet

java.lang.Object
   |
   +----java.servlet.GenericServlet
           |
           +----java.servlet.http.HttpServlet
                   |
                   +----sun.server.http.ProxyServlet

public class ProxyServlet
extends HttpServlet
implements FetchContents
Proxy Servlet

Constructor Index

 o ProxyServlet()
Creates a new proxy servlet.

Method Index

 o fetch(URL)
The method that is invoked when there is a cache miss.
 o getServletInfo()
Returns information about this servlet.
 o init(ServletStub)
Initializes the proxy servlet.
 o service(HttpServletRequest, HttpServletResponse)
Services a single proxy request from the client.

Constructors

 o ProxyServlet
  public ProxyServlet()
Creates a new proxy servlet.

Methods

 o init
  public void init(ServletStub stub) throws ServletException
Initializes the proxy servlet.
Overrides:
init in class GenericServlet
 o service
  public void service(HttpServletRequest req,
                      HttpServletResponse res) throws ServletException, IOException
Services a single proxy request from the client.
Parameters:
req - the servlet request
res - the servlet response
Throws: IOException
if an I/O error has occurred
Overrides:
service in class HttpServlet
 o getServletInfo
  public String getServletInfo()
Returns information about this servlet.
Overrides:
getServletInfo in class GenericServlet
 o fetch
  public URLContents fetch(URL url) throws IOException
The method that is invoked when there is a cache miss.
Parameters:
url - - The URL for which there was a cache miss.
The - URLContents which describe the contents of the URL.
Throws: IOException
when there is an IOException while fetching the contents.
Throws: MalformedURLException
when the URL is malformed

All Packages  Class Hierarchy  This Package  Previous  Next  Index