MCPcopy Index your code
hub / github.com/curtcox/JLHTTP / ContextHandler

Interface ContextHandler

src/main/java/net/freeutils/httpserver/HTTPServer.java:1032–1047  ·  view source on GitHub ↗

A ContextHandler serves the content of resources within a context. @see VirtualHost#addContext

Source from the content-addressed store, hash-verified

1030 * @see VirtualHost#addContext
1031 */
1032 public interface ContextHandler {
1033
1034 /**
1035 * Serves the given request using the given response.
1036 *
1037 * @param req the request to be served
1038 * @param resp the response to be filled
1039 * @return an HTTP status code, which will be used in returning
1040 * a default response appropriate for this status. If this
1041 * method invocation already sent anything in the response
1042 * (headers or content), it must return 0, and no further
1043 * processing will be done
1044 * @throws IOException if an IO error occurs
1045 */
1046 int serve(Request req, Response resp) throws IOException;
1047 }
1048
1049 /**
1050 * The {@code FileContextHandler} services a context by mapping it

Callers 1

serveMethod · 0.95

Implementers 3

FileContextHandlersrc/main/java/net/freeutils/httpserver
MethodContextHandlersrc/main/java/net/freeutils/httpserver
HTTPServersrc/main/java/net/freeutils/httpserver

Calls

no outgoing calls

Tested by

no test coverage detected