xmatthew
BlogJava
::
首页
::
新随笔
::
联系
::
聚合
::
管理
posts - 31, comments - 126, trackbacks - 0
<
2008年3月
>
日
一
二
三
四
五
六
24
25
26
27
28
29
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
常用链接
我的随笔
我的评论
我的参与
最新评论
留言簿
(6)
给我留言
查看公开留言
查看私人留言
随笔档案
2008年7月 (1)
2008年6月 (4)
2008年5月 (9)
2008年4月 (11)
2008年3月 (4)
文章档案
2008年3月 (1)
搜索
最新评论
1. re: 推荐一本使用Java开源工具实践XP经验的书籍
thanks
--fantasybei
2. re: Eclipse 3.4(ganymede木卫三)今天正式发布
下载看了下 乏善可陈。。。也许 Eclipse 过于完美了 哈哈
--BeanSoft
3. re: Eclipse 3.4(ganymede木卫三)今天正式发布
不尝鲜了,老尝鲜浪费时间
--leekiang
4. re: Eclipse 3.4(ganymede木卫三)今天正式发布
@Jacky-Q
由于eclipse 3.3的代号为Europa(木卫二),所以Ganymede(木卫三)应该是eclipse项目团队的本意,不过Ganymede的确有美少男的含意。
--x.matthew
5. re: Eclipse 3.4(ganymede木卫三)今天正式发布
木卫三欠妥。应该叫美少年才对,参见希腊神话。
--Jacky-Q
阅读排行榜
1. Eclipse 3.4(ganymede木卫三)今天正式发布(1819)
2. Spring 2.5 配置文档帮助卡片(1709)
3. (原创)基于组件化的监控平台开发监控Tomcat服务及邮件通知功能(1668)
4. Eclipse 3.4(ganymede木卫三)6月25日正式发布(1652)
5. 推荐一个非常实用的eclipse插件 classlocator(1520)
评论排行榜
1. (原创)设计一个Tomcat访问日志分析工具(21)
2. (原创)Java实现一个自动排序容器(16)
3. spy2servers组件化的监控平台使用帮助手册(更新)(14)
4. 推荐一个非常实用的eclipse插件 classlocator(13)
5. (原创)基于组件化的监控平台开发监控Tomcat服务及邮件通知功能(8)
60天内阅读排行
1. Eclipse 3.4(ganymede木卫三)今天正式发布(1819)
2. Spring 2.5 配置文档帮助卡片(1709)
3. Eclipse 3.4(ganymede木卫三)6月25日正式发布(1652)
4. 推荐两个firefox插件(1266)
5. Spring Integration 学习笔记(1125)
(原创)搭建一个组件化的监控平台
最近看到一位同事正在开发一个监控软件,要求就是通过针对服务器现有的一些接口,通过这些接口返回的数据进行分析,如果监控的值到达预先设定的范围则通过短信的方式发送给管理员。
从整个开发的功能上来看是一个比较单一也很明确的功能,所开发的系统对所其所监控的软件的依赖性也非常大,主要是监控的数据分析行为和监控信息的服务报警行为这块。既然这两块很难做成一个通用的功能模块,那就搭建一个监控平台,可以让这些功能模块通过组件的方式自由的注册和销毁。
所有我构思了这个监控平台,它对外有三个接口,分别是监控接口,报警接口和监控消息监控接口。由平台统一管理这些组件的生命周期,每个组件都过单独的线程运行。提供一个核心组件CoreComponent调度所有监控数据的流转。平台本身还使用基于jmx管理服务技术提供对所有当前使用的组件运行情况的监控,也包括动态的启动和停止组件的运行状态。
下载地址
二进制程序
第三方类库下载
,
第三方类库下载
放到lib目录下。
api-docs
源代码
/** */
/**
* Component interface.
* 组件接口,提供组件的基本管理服务和状态监控。 所有组件必须要实现该接口。
*
*
@author
XieMaLin
*
*/
public
interface
Component
{
/** */
/**
* component run status
*
*/
public
final
static
int
ST_RUN
=
1
;
/** */
/**
* component run status name
*/
public
final
static
String ST_RUN_NAME
=
"
Active
"
;
/** */
/**
* component stop status
*/
public
final
static
int
ST_STOP
=
2
;
/** */
/**
* component stop status name
*/
public
final
static
String ST_STOP_NAME
=
"
Decctive
"
;
/** */
/**
* get component status
* <p>
* One of ST_RUN, ST_STOP.
*
@return
component status
*/
public
int
getStatus();
/** */
/**
* get component status
* <p>
* One of ST_RUN_NAME, ST_STOP_NAME.
*
*
@return
component status name
*/
public
String getStatusName();
/** */
/**
* if component active return true
*
*
@return
true if component is in status ST_RUN
*/
public
boolean
isActive();
/** */
/**
* will be invoked after component plugs.
*/
public
void
startup();
/** */
/**
* will be invoked after component unplugs.
*/
public
void
stop();
/** */
/**
* set component context to the component.
* it will auto invoke by CoreComponent
*
*
@param
context set the component context
*
*/
public
void
setContext(ComponentContext context);
/** */
/**
*
@return
get the component context
*/
public
ComponentContext getContext();
/** */
/**
* get component name
*
@return
get component name
*/
public
String getName();
/** */
/**
* get component strartup date
*
@return
get component strartup date
*/
public
Date getStartupDate();
/** */
/**
* set startup date to the component.
* it will auto invoke by CoreComponent
*
*
@param
date startup date
*/
public
void
setStartupDate(Date date);
点击查看具体内容:
http://www.blogjava.net/xmatthew/articles/185673.html
posted on 2008-03-12 13:48
x.matthew
阅读(775)
评论(2)
编辑
收藏
Feedback
#
re: (原创)搭建一个组件化的监控平台
2008-03-13 12:09 |
x.matthew
文章已经更新,源代码已经整理并上传。
回复
更多评论
#
re: (原创)搭建一个组件化的监控平台
2008-03-17 21:09 |
长江三峡
学习
回复
更多评论
新闻频道
新用户注册
刷新评论列表
标题
姓名
主页
验证码
*
内容(请不要发表任何与政治相关的内容)
Remember Me?
登录
使用高级评论
新用户注册
返回页首
恢复上次提交
[使用Ctrl+Enter键可以直接提交]
该文被作者在 2008-03-18 10:26 编辑过
博客园
BlogJava
博客生活
IT博客网
C++博客
PHP博客
博客园社区
管理博客
教师博客
天文博客
汽车博客
足球博客
股票博客
电子技术博客