类 DebugContextManager
java.lang.Object
cn.nkpro.elcube.co.DebugContextManager
- 所有已实现的接口:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
@Component
public class DebugContextManager
extends Object
implements org.springframework.context.ApplicationContextAware
此类的命名有些不合理,事实上它就是ApplicationContextManager
这个类管理着所有自定义对象的不同状态,激活与调试
甚至管理系统中运行中的调试Context
它根据上下文中的debug参数,来给运行时程序返回一个合理的Bean对象 同时它接收运行时程序需要调试、或者取消调试的命令
根据 startThreadLocal(String) 来启动当前线程为调试模式,从指定的调试上下文中获取运行实例Bean
根据 addDebugResource(String, Object) 向指定的调试上下文中覆盖一个需要调试的对象
根据 addActiveResource(String, NkScriptV, boolean) 向指定的调试上下文中覆盖一个需要激活的对象
调试时,日志在前端的输出也是由它来处理,通过重写System.out,来截取线程中的log信息
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidaddActiveResource(String key, NkScriptV scriptDef, boolean rewrite)voidaddDebugResource(String key, Object resource)向debug缓存中添加一个需要调试的资源,如: 前缀 $:脚本Vue对象 前缀 @:单据DocType配置createContext(String desc, String username)创建上下文org.springframework.context.ApplicationContext获取当前debug的上下文对象返回上下文列表<T> TgetDebugResource(String key)获取当前debug的缓存中获取单个资源<T> List<T>getDebugResources(String... keyPrefix)booleanisDebug()voidremoveContext(String debugId)停止一个上下文voidremoveDebugResource(String key, Object resource)voidsetApplicationContext(@NotNull org.springframework.context.ApplicationContext applicationContext)
-
构造器详细资料
-
DebugContextManager
public DebugContextManager()
-
-
方法详细资料
-
getDebugContextList
返回上下文列表 -
createContext
创建上下文 -
removeContext
停止一个上下文 -
addDebugResource
向debug缓存中添加一个需要调试的资源,如: 前缀 $:脚本Vue对象 前缀 @:单据DocType配置 -
addActiveResource
-
removeDebugResource
-
isDebug
public boolean isDebug() -
getDebugResource
获取当前debug的缓存中获取单个资源 -
getDebugResources
-
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext()获取当前debug的上下文对象 -
setApplicationContext
public void setApplicationContext(@NotNull @NotNull org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException- 指定者:
setApplicationContext在接口中org.springframework.context.ApplicationContextAware- 抛出:
org.springframework.beans.BeansException
-