• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2007, Vol. 29 ›› Issue (5): 120-122.

• 论文 • 上一篇    下一篇

基于AOP技术的通用线程监控平台的研究与实现

张瞩熹[1,2] 郭长国[1,2] 苑洪亮[2] 王怀民[2]   

  • 出版日期:2007-05-01 发布日期:2010-06-02

  • Online:2007-05-01 Published:2010-06-02

摘要:

在传统的OOP编程中,由于需求空间是N维而实现空间是一维的,导致了软件开发中横切关注点的代码纠缠问题,严重影响了软件的质量.作为OOP的补充,AOP很好地解决了横切关注点带来的问题,提供了核心关注点和横切关注点互相分离的解决方案.本文从具体工程中开发线程监控这一需求所暴露的问题出发,提出了为什么需要AOP编程;然后着重讨论 如何通过AOP技术解决这一问题,提出并实现了基于AOP技术的通用线程监控平台.该平台可以在不手工改变系统源代码的情况下通过工具植入系统内部,实现对运行线程信息的监视、对指定线程运行速度的变换和对整个系统运行行为的控制.

关键词: AOP 面向方面编程 线程监控 AspectC++

Abstract:

In traditional OOP programming, as the requirement space is N- dimensional while the implementation space is one-dimensional, this terrible mapping le ads to the crosscutting concern code's tangling problem in program development, which seriously affects the quality of software. As the supplement of O OOP, AOP successfully solves the problem brought by crosscutting concern. In this paper, from the view of the multithreaded monitor requirements in appl  ications, we implement an AOP-based general thread monitor platform, which can be embedded into applications, but does not need to change the source cod  e. So it can monitor the thread status, and control the run-time behaviors of the whole system.

Key words: (AOP;aspeet oriented programming, thread monitor, AspeetC+ +)