public class CloudGatewayConfiguration extends java.lang.Object implements CloudRouteRegister
限定符和类型 | 字段和说明 |
---|---|
protected java.util.List<RankEntity<ExFilter>> |
filters |
protected java.util.List<ExFilter> |
routeDefaultFilters |
protected java.util.Map<java.lang.String,RouteSpec> |
routes |
构造器和说明 |
---|
CloudGatewayConfiguration() |
限定符和类型 | 方法和说明 |
---|---|
void |
filter(ExFilter filter)
配置过滤器
|
void |
filter(ExFilter filter,
int index)
配置过滤器
|
CloudRouteRegister |
route(RouteSpec route)
配置路由(替换)
|
CloudRouteRegister |
route(java.lang.String id,
java.util.function.Consumer<RouteSpec> builder)
配置路由(构建或更新)
|
void |
routeDefaultFilter(ExFilter filter)
路由默认过滤器
|
Route |
routeFind(ExContext ctx)
查找路由记录
|
CloudRouteRegister |
routeRemove(java.lang.String id)
路由移除
|
protected final java.util.Map<java.lang.String,RouteSpec> routes
protected final java.util.List<ExFilter> routeDefaultFilters
protected java.util.List<RankEntity<ExFilter>> filters
public void filter(ExFilter filter)
filter
- 过滤器public void filter(ExFilter filter, int index)
filter
- 过滤器index
- 顺序位public void routeDefaultFilter(ExFilter filter)
public CloudRouteRegister route(java.lang.String id, java.util.function.Consumer<RouteSpec> builder)
route
在接口中 CloudRouteRegister
id
- 标识builder
- 路由构建器public CloudRouteRegister route(RouteSpec route)
route
在接口中 CloudRouteRegister
route
- 路由public CloudRouteRegister routeRemove(java.lang.String id)
CloudRouteRegister
routeRemove
在接口中 CloudRouteRegister
id
- 标识