Package one.nio.http
Class PathMapper
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<String,RequestHandler[]>
-
- one.nio.http.PathMapper
-
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,RequestHandler[]>
public class PathMapper extends HashMap<String,RequestHandler[]>
Finds a RequestHandler by the given @Path and HTTP method. Uses an embedded HashMap for performance reasons.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description PathMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(String path, int[] methods, RequestHandler handler)RequestHandlerfind(String path, int method)-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
-
-
-
Method Detail
-
add
public void add(String path, int[] methods, RequestHandler handler)
-
find
public RequestHandler find(String path, int method)
-
-