public abstract class Gateway extends HandlerAide implements Handler, Render
构造器和说明 |
---|
Gateway() |
Gateway(RoutingTable<Handler> routingTable) |
限定符和类型 | 方法和说明 |
---|---|
void |
add(BeanWrap beanWp)
添加接口
|
void |
add(BeanWrap beanWp,
boolean remoting)
添加接口(适用于,从应用容器遍历加入;或者把rpc代理包装成bw)
|
void |
add(java.lang.Class<?> beanClz)
添加接口
|
void |
add(java.lang.Class<?> beanClz,
boolean remoting)
添加接口(remoting ?
|
void |
add(Handler handler)
添加默认接口处理
|
void |
add(java.lang.String path,
BeanWrap beanWp)
添加接口
|
void |
add(java.lang.String path,
BeanWrap beanWp,
boolean remoting)
添加接口
|
void |
add(java.lang.String path,
java.lang.Class<?> beanClz)
添加接口
|
void |
add(java.lang.String path,
java.lang.Class<?> beanClz,
boolean remoting)
添加接口(remoting ?
|
void |
add(java.lang.String path,
Handler handler)
添加二级路径处理
|
void |
add(java.lang.String path,
MethodType method,
Handler handler)
添加二级路径处理
|
void |
addBeans(java.util.function.Predicate<BeanWrap> where)
添加接口
|
void |
addBeans(java.util.function.Predicate<BeanWrap> where,
boolean remoting)
添加接口(remoting 的 bean 建议一个个添加,并同时添加前缀 path)
|
protected void |
addDo(java.lang.String path,
MethodType method,
int index,
Handler handler)
添加接口
|
protected boolean |
allowActionMapping()
允许 Action Mapping 申明
|
protected boolean |
allowPathMerging()
允许路径合并
|
protected boolean |
allowReadyController()
允许提前准备控制器
|
Handler |
find(Context c)
查找接口
|
protected Handler |
findDo(Context c,
java.lang.String path) |
protected Handler |
getDo(Context c,
java.lang.String path)
获取接口
|
RoutingTable<Handler> |
getMainRouting()
获取内部主路由(方便文档生成)
|
void |
handle(Context c)
for Handler
|
protected void |
handleDo(Context c)
执行处理
|
protected void |
mainAfters(Context c) |
protected void |
mainBefores(Context c) |
protected void |
mainDo(Context c)
执行主处理
|
protected void |
prepareDo(Context c)
执行预备
|
protected abstract void |
register()
注册相关接口与拦截器
|
void |
render(java.lang.Object obj,
Context c)
for Render (用于接管 BeanWebWrap 和 Action 的渲染)
|
filter, filter, filters
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
matched, name, renderAndReturn
public Gateway()
public Gateway(RoutingTable<Handler> routingTable)
public RoutingTable<Handler> getMainRouting()
protected abstract void register()
protected boolean allowActionMapping()
protected boolean allowReadyController()
protected boolean allowPathMerging()
public void render(java.lang.Object obj, Context c) throws java.lang.Throwable
public void handle(Context c) throws java.lang.Throwable
protected void handleDo(Context c) throws java.lang.Throwable
java.lang.Throwable
protected void prepareDo(Context c)
protected void mainDo(Context c) throws java.lang.Throwable
java.lang.Throwable
protected void mainBefores(Context c) throws java.lang.Throwable
java.lang.Throwable
protected void mainAfters(Context c) throws java.lang.Throwable
java.lang.Throwable
public void addBeans(java.util.function.Predicate<BeanWrap> where)
public void addBeans(java.util.function.Predicate<BeanWrap> where, boolean remoting)
public void add(java.lang.Class<?> beanClz)
public void add(java.lang.String path, java.lang.Class<?> beanClz)
public void add(java.lang.Class<?> beanClz, boolean remoting)
public void add(java.lang.String path, java.lang.Class<?> beanClz, boolean remoting)
public void add(BeanWrap beanWp)
public void add(java.lang.String path, BeanWrap beanWp)
public void add(BeanWrap beanWp, boolean remoting)
public void add(java.lang.String path, BeanWrap beanWp, boolean remoting)
public void add(Handler handler)
public void add(java.lang.String path, Handler handler)
public void add(java.lang.String path, MethodType method, Handler handler)
protected void addDo(java.lang.String path, MethodType method, int index, Handler handler)