public class HttpListenerRegistry.Path extends Object
| Constructor and Description |
|---|
Path(String name,
HttpListenerRegistry.Path parent)
Creates a new instance for the given name and with the provided parent.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChildPath(String pathName,
HttpListenerRegistry.Path path)
Adds a new sub or uri param path.
|
void |
addRequestHandlerMatcherPair(HttpListenerRegistry.RequestHandlerMatcherPair requestHandlerMatcherPair)
Adds a new request handler and matcher for this path.
|
void |
addWildcardRequestHandler(HttpListenerRegistry.RequestHandlerMatcherPair requestHandlerMatcherPair)
Adds a request handler matcher pair for the catch all sub path (/*).
|
HttpListenerRegistry.Path |
getCatchAll() |
HttpListenerRegistry.Path |
getCatchAllUriParam() |
HttpListenerRegistry.Path |
getChildPath(String subPath,
String nextSubPath) |
HttpListenerRegistry.Path |
getLastChildPath(String subPath) |
List<HttpListenerRegistry.RequestHandlerMatcherPair> |
getRequestHandlerMatcherPairs() |
Map<String,HttpListenerRegistry.Path> |
getSubPaths() |
boolean |
isEmpty() |
void |
removeChildPath(String pathName)
Removes a sub path and checks whether this path itself should be removed.
|
boolean |
removeRequestHandlerMatcherPair(HttpListenerRegistry.RequestHandlerMatcherPair requestHandlerMatcherPair)
Removes a request handler and matcher pair whether it's in a regular sub path, the catch all sub path or a uri param
sub path.
|
public Path(String name, HttpListenerRegistry.Path parent)
name - for this pathparent - of this pathpublic HttpListenerRegistry.Path getCatchAll()
public HttpListenerRegistry.Path getCatchAllUriParam()
public HttpListenerRegistry.Path getChildPath(String subPath, String nextSubPath)
subPath - the sub part of the path to findnextSubPath - the next sub part of the path. It is useful for deciding between static paths and middle-wildcard paths when they are similar.public HttpListenerRegistry.Path getLastChildPath(String subPath)
subPath - a sub part of the pathpublic void addRequestHandlerMatcherPair(HttpListenerRegistry.RequestHandlerMatcherPair requestHandlerMatcherPair)
requestHandlerMatcherPair - the pair to addpublic void addChildPath(String pathName, HttpListenerRegistry.Path path)
pathName - the path namepath - the representation of this pathpublic void removeChildPath(String pathName)
pathName - the path namepublic boolean isEmpty()
public Map<String,HttpListenerRegistry.Path> getSubPaths()
public List<HttpListenerRegistry.RequestHandlerMatcherPair> getRequestHandlerMatcherPairs()
public void addWildcardRequestHandler(HttpListenerRegistry.RequestHandlerMatcherPair requestHandlerMatcherPair)
requestHandlerMatcherPair - the pair to addpublic boolean removeRequestHandlerMatcherPair(HttpListenerRegistry.RequestHandlerMatcherPair requestHandlerMatcherPair)
requestHandlerMatcherPair - Copyright © 2003–2018 MuleSoft, Inc.. All rights reserved.