public class RoutingTableDefault<T> extends Object implements RoutingTable<T>
| Constructor and Description |
|---|
RoutingTableDefault() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Routing<T> routing)
添加路由记录
|
void |
clear()
清空
|
int |
count()
数量
|
Collection<Routing<T>> |
getAll()
获取所有的路由记录
|
Collection<Routing<T>> |
getBy(Class<?> controllerClz)
获取控制器的路由记录
|
Collection<Routing<T>> |
getBy(String pathPrefix)
获取路径的路由记录
|
List<T> |
matchMore(String path,
String version,
MethodType method)
区配多个目标
|
T |
matchOne(String path,
String version,
MethodType method)
区配一个目标
|
Result<T> |
matchOneAndStatus(String path,
String version,
MethodType method)
区配一个目标并给出状态
|
void |
remove(Class<?> controllerClz)
移除路由记录
|
void |
remove(String pathPrefix)
移除路由记录
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmatchMore, matchOne, matchOneAndStatuspublic void add(Routing<T> routing)
add in interface RoutingTable<T>routing - 路由public void remove(String pathPrefix)
remove in interface RoutingTable<T>pathPrefix - 路径前缀public void remove(Class<?> controllerClz)
remove in interface RoutingTable<T>controllerClz - 控制器类public int count()
RoutingTablecount in interface RoutingTable<T>public Collection<Routing<T>> getAll()
RoutingTablegetAll in interface RoutingTable<T>public Collection<Routing<T>> getBy(String pathPrefix)
RoutingTablegetBy in interface RoutingTable<T>pathPrefix - 路径public Collection<Routing<T>> getBy(Class<?> controllerClz)
RoutingTablegetBy in interface RoutingTable<T>controllerClz - 控制器类public T matchOne(String path, String version, MethodType method)
matchOne in interface RoutingTable<T>path - 路径method - 方法version - 版本号public Result<T> matchOneAndStatus(String path, String version, MethodType method)
matchOneAndStatus in interface RoutingTable<T>path - 路径method - 方法version - 版本号public List<T> matchMore(String path, String version, MethodType method)
matchMore in interface RoutingTable<T>path - 路径method - 方法version - 版本号public void clear()
RoutingTableclear in interface RoutingTable<T>Copyright © 2025. All rights reserved.