[BEAN] 配置
value-ref="emailInterfaceServer" />
class="org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler">
class="org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource" />
[使用注解实现JMX页面显示]
package com.star.sms.business.collection.jmx;
// 省略
/**
* 客户帐单邮件提醒管理Bean
*
* @author liuyong 2014-01-22
* @version 5.4.4.9
*
*/
@ManagedResource(description = "Bill Remind Email Manager") //描述用于页面显示
public class CollmgmtEmailJmx {
@ManagedOperation(description = "Send remind Email for customer ,The email contains the billing information")
public void sendBillEmails() {
//这是一个无参数的方法
}
@ManagedOperation(description = "[ Testing ]: send remind Email to one cusomer by customer code")
//描述用于页面显示
@ManagedOperationParameters( {
@ManagedOperationParameter(name = "customerCode", description = "Customer Code"), //参数名称,及参数描述
@ManagedOperationParameter(name = "targetEmail", description = "Target Email") })
public void sendBillEmailTesting(String customerCode, String targetEmail) {
//这是一个带参数的方法
}
}
}
[JMX效果]
[JMX相关方法信息]