A ContextHandler serves the content of resources within a context. @see VirtualHost#addContext
| 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 |
no outgoing calls
no test coverage detected