Package org.jvnet.hudson.test
Class JavaNetReverseProxy
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.jvnet.hudson.test.JavaNetReverseProxy
-
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
public class JavaNetReverseProxy extends javax.servlet.http.HttpServletActs as a reverse proxy, so that during a test we can avoid hitting updates.jenkins.io.The contents are cached locally.
- Author:
- Kohsuke Kawaguchi
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description intlocalPort
-
Constructor Summary
Constructors Constructor Description JavaNetReverseProxy(File cacheFolder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JavaNetReverseProxygetInstance()Gets the default instance.protected voidservice(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)voidstop()-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
-
-
-
-
Method Detail
-
service
protected void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException- Overrides:
servicein classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
getInstance
public static JavaNetReverseProxy getInstance() throws Exception
Gets the default instance.- Throws:
Exception
-
-