flowable ContentEngine和ContentEngineConfiguration的关系
来源:互联网 发布:身份证识别器录入软件 编辑:程序博客网 时间:2024/06/15 17:58
一、CommandExecutor
ContentEngineConfiguration继承自 AbstractEngineConfiguration。
在 AbstractEngineConfiguration 中包含一个CommandExecutor 属性。
protected CommandExecutor commandExecutor;
二、ContentManagementService和ContentService
ContentEngineConfiguration中包含两个属性:
protected ContentManagementService contentManagementService = new ContentManagementServiceImpl(); protected ContentService contentService = new ContentServiceImpl();
三、创建ContentEngine
ContentEngine是通过调用ContentEngineConfiguration实例的buildContentEngine()完成创建的。
public ContentEngine buildContentEngine() { init(); return new ContentEngineImpl(this); }
1、传递CommandExecutor
在调用ContentEngineConfiguration的buildContentEngine()方法时,在 AbstractEngineConfiguration 中包含的CommandExecutor 属性被赋值给ServiceImpl。代码如下:
protected void initServices() { initService(contentManagementService); initService(contentService); } protected void initService(Object service) { if (service instanceof ServiceImpl) { ((ServiceImpl) service).setCommandExecutor(commandExecutor); } }
ServiceImpl是ContentService和ContentManagementService的父类,包含一个CommandExecutor 属性。(见下图)
至此,ContentEngineConfiguration 初始化了ContentService和ContentManagementService,并把父类中的CommandExecutor传递给了这两个类的实例。
2、构建ContentEngine
ContentEngineConfiguration被当作参数传递给ContentEngineImpl的构造方法。
public ContentEngine buildContentEngine() { init(); return new ContentEngineImpl(this); }
ContentEngineImpl通过ContentEngineConfiguration得到ConentService和ContentManagementService,并对外提供。
public ContentEngineImpl(ContentEngineConfiguration engineConfiguration) { this.engineConfiguration = engineConfiguration; this.name = engineConfiguration.getEngineName(); this.managementService = engineConfiguration.getContentManagementService(); this.contentService = engineConfiguration.getContentService(); ... }
ContentEngine 提供的服务最终的执行者是ContentService和ContentManagementService的父类 ServiceImpl;
而 ServiceImpl的执行器是由 AbstractEngineConfiguration提供的。
- flowable ContentEngine和ContentEngineConfiguration的关系
- flowable EngineConfiguration的作用和继承关系(1)
- flowable DmnEngine和DmnEngineConfiguration
- flowable FormEngine和FormEngineConfiguration
- flowable IdmEngine和IdmEngineConfiguration
- flowable ProcessEngine和ProcessEngineConfiguration
- flowable 五个引擎和组成引擎的服务
- rxjava2的Flowable使用方法
- Flowable
- Rxjava2源码分析(一):Flowable的创建和基本使用过程分析
- flowable EngineConfiguration的实现分析(2)
- Flowable V5.x迁移至Flowable V6时需要注意的事项
- flowable 6.1.2 命令行完成请假审批流程的例子
- flowable入门
- flowable使用
- flowable appModel
- flowable正式版
- flowable工作流
- hdu2090 算菜价(C语言)
- Go语言的素数对象编程实现及其使用
- MySQL删除视图
- Fragment 生命周期
- 奇怪的非同寻常的金币
- flowable ContentEngine和ContentEngineConfiguration的关系
- n个数中y数字出现了几次
- 机器学习自学网址
- 这个超时了的对程序(1到n中y数字出现了几次)
- Verilog数组初始化赋值
- 数字反转,哈哈哈(无缺陷)
- ADM Radeon R9 NANO参数
- 其他的搜索引擎
- 多源最短路径之Floyd算法