forked from fanruan/fineui
iapyang
2 years ago
1 changed files with 28 additions and 0 deletions
@ -0,0 +1,28 @@
|
||||
import type WorkerBaseController from "../controller/worker.controller"; |
||||
|
||||
/** |
||||
* 事务的基类 |
||||
*/ |
||||
export default abstract class WorkerBaseAction { |
||||
/** |
||||
* 通信控制器 |
||||
*/ |
||||
protected controller: WorkerBaseController; |
||||
|
||||
/** |
||||
* 线程上的 action 集合, 用于调用其他命名空间下的事务 |
||||
*/ |
||||
protected threadAction: any; |
||||
|
||||
public constructor(controller: WorkerBaseController, threadAction: any) { |
||||
this.controller = controller; |
||||
this.threadAction = threadAction; |
||||
|
||||
this.addActionHandler(); |
||||
} |
||||
|
||||
/** |
||||
* 添加事务的处理器 |
||||
*/ |
||||
protected abstract addActionHandler(): void; |
||||
} |
Loading…
Reference in new issue