java.lang.Object
dev.katsute.simplehttpserver.handler.PredicateHandler
dev.katsute.simplehttpserver.handler.RootHandler
- All Implemented Interfaces:
HttpHandler
,SimpleHttpHandler
By default, exchanges will look for the closest matching context for their handler, this consequently means that the root index
The RootHandler resolves this issue by only accepting requests to the exact context
/
would catch any requests without a handler instead of returning a code 404.
The RootHandler resolves this issue by only accepting requests to the exact context
/
and sending the rest to an alternative handler, typically where a 404 page would reside.- Since:
- 5.0.0
- Version:
- 5.0.0
- Author:
- Katsute
-
Constructor Summary
-
Method Summary
Methods inherited from class dev.katsute.simplehttpserver.handler.PredicateHandler
handle, handle
-
Constructor Details
-
RootHandler
Creates a root handler.- Parameters:
index
- handler to use for context/
other
- handler to use for all other contexts, typically a 404 page- Since:
- 5.0.0
-
-
Method Details
-
toString
- Overrides:
toString
in classPredicateHandler
-