/**
* Ensures that an {@code MBeanServerConnection} is configured and attempts
* to detect a local connection if one is not supplied.
*/
public void prepare() {
synchronized (this.preparationMonitor) {
if (this.server != null) {
this.serverToUse = this.server;
}
else {
this.serverToUse = null;
this.serverToUse = this.connector.connect(this.serviceUrl, this.environment, this.agentId);
}
this.invocationHandler = null;
if (this.useStrictCasing) {
// Use the JDK's own MBeanServerInvocationHandler, in particular for native MXBean support.
this.invocationHandler = new MBeanServerInvocationHandler(this.serverToUse, this.objectName,
(this.managementInterface != null && JMX.isMXBeanInterface(this.managementInterface)));
}
else {
// Non-strict casing can only be achieved through custom invocation handling.
// Only partial MXBean support available!
retrieveMBeanInfo();
}
}
}
MBeanClientInterceptor.java 文件源码
java
阅读 39
收藏 0
点赞 0
评论 0
项目:spring4-understanding
作者:
评论列表
文章目录