org.plovr
Class TestHandler
java.lang.Object
org.plovr.TestHandler
- All Implemented Interfaces:
- com.sun.net.httpserver.HttpHandler
public class TestHandler
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
server
protected final CompilationServer server
TestHandler
public TestHandler(CompilationServer server)
doGet
protected void doGet(com.sun.net.httpserver.HttpExchange exchange,
QueryData data,
Config config)
throws java.io.IOException
- All parameters are guaranteed to be non-null.
- Throws:
java.io.IOException
getRelativeTestFilePaths
public static java.util.Set<java.lang.String> getRelativeTestFilePaths(Config config)
- Returns:
- all paths to _test.html files, none of which start with a leading
slash
handle
public final void handle(com.sun.net.httpserver.HttpExchange ex)
throws java.io.IOException
- Specified by:
handle
in interface com.sun.net.httpserver.HttpHandler
- Throws:
java.io.IOException
setCacheHeaders
protected void setCacheHeaders(com.sun.net.httpserver.Headers headers)
- Sets the cache headers to disable caching of resources.
See http://code.google.com/p/doctype/wiki/ArticleHttpCaching
getCompilation
@Nullable
protected final Compilation getCompilation(com.sun.net.httpserver.HttpExchange exchange,
QueryData data,
Config config)
throws java.io.IOException
- Successfully returns a
Compilation
(and records it as the latest
Compilation
for the config), or returns null, indicating that no
Compilation
could be found and that an error message was already
written.
- Throws:
java.io.IOException
getCompilation
@Nullable
protected final Compilation getCompilation(com.sun.net.httpserver.HttpExchange exchange,
QueryData data,
Config config,
boolean recordCompilation)
throws java.io.IOException
- Throws:
java.io.IOException