This only matches a single level of a request, e.g if you have a request that takes the form:
/foo/bar
| Modifier and Type | Field and Description |
|---|---|
| private final LRUCache | |
| private final PathMatcher |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized PathHandler | Returns: The resulting PathHandler after this path has been added to it.If the request path is exactly this, run handler. path, final HttpHandler Handler run upon exact path match. handler)If the request path is exactly equal to the given path, run the handler. |
| public synchronized PathHandler | addPath(final String
The path path, final HttpHandler The handler handler)
Deprecated
for removal since 1.0.0. Superseded by
addPrefixPath(String, io..
Adds a path prefix and a handler for that path. |
| public synchronized PathHandler | Returns: The resulting PathHandler after this path has been added to it.If the request contains this prefix, run handler. path, final HttpHandler The handler which is activated upon match. handler)Adds a path prefix and a handler for that path. |
| public synchronized PathHandler | |
| public void | handleRequest(HttpServerExchange
the HTTP request/response exchange exchange)Implements io. Handle the request. |
| public synchronized PathHandler | |
| public synchronized PathHandler | |
| public synchronized PathHandler | |
| public String |
| cache | back to summary |
|---|---|
| private final LRUCache<String, PathMatcher. | |
| pathMatcher | back to summary |
|---|---|
| private final PathMatcher<HttpHandler> pathMatcher | |
| PathHandler | back to summary |
|---|---|
| public PathHandler(final HttpHandler defaultHandler) | |
| PathHandler | back to summary |
|---|---|
| public PathHandler(final HttpHandler defaultHandler, int cacheSize) | |
| PathHandler | back to summary |
|---|---|
| public PathHandler() | |
| PathHandler | back to summary |
|---|---|
| public PathHandler(int cacheSize) | |
| addExactPath | back to summary |
|---|---|
| public synchronized PathHandler addExactPath(final String path, final HttpHandler handler) If the request path is exactly equal to the given path, run the handler. Exact paths are prioritized higher than prefix paths.
| |
| addPath | back to summary |
|---|---|
| public synchronized PathHandler addPath(final String path, final HttpHandler handler)
Deprecated for removal since 1.0.0. Superseded by Adds a path prefix and a handler for that path. If the path does not start with a / then one will be prepended. The match is done on a prefix bases, so registering /foo will also match /foo/bar. Exact path matches are taken into account first. If / is specified as the path then it will replace the default handler.
| |
| addPrefixPath | back to summary |
|---|---|
| public synchronized PathHandler addPrefixPath(final String path, final HttpHandler handler) Adds a path prefix and a handler for that path. If the path does not start with a / then one will be prepended. The match is done on a prefix bases, so registering /foo will also match /foo/bar. Though exact path matches are taken into account before prefix path matches. So if an exact path match exists its handler will be triggered. If / is specified as the path then it will replace the default handler.
| |
| clearPaths | back to summary |
|---|---|
| public synchronized PathHandler clearPaths() | |
| handleRequest | back to summary |
|---|---|
| public void handleRequest(HttpServerExchange exchange) throws Exception Implements io. Doc from io. Handle the request.
| |
| removeExactPath | back to summary |
|---|---|
| public synchronized PathHandler removeExactPath(final String path) | |
| removePath | back to summary |
|---|---|
| public synchronized PathHandler removePath(final String path)
Deprecated
| |
| removePrefixPath | back to summary |
|---|---|
| public synchronized PathHandler removePrefixPath(final String path) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |