forget to add new files in

This commit is contained in:
Kelven Yang 2011-03-07 19:43:37 -08:00
parent d0892a964d
commit 13c5a4ebcf
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,8 @@
package com.cloud.cluster;
public interface ClusterManagerMBean {
public long getMsid();
public String getLastUpdateTime();
public String getClusterNodeIP();
public String getVersion();
}

View File

@ -0,0 +1,35 @@
package com.cloud.cluster;
import java.util.Date;
import java.util.TimeZone;
import javax.management.StandardMBean;
import com.cloud.utils.DateUtil;
public class ClusterManagerMBeanImpl extends StandardMBean implements ClusterManagerMBean {
private ManagementServerHostVO _mshostVo;
public ClusterManagerMBeanImpl(ManagementServerHostVO mshostVo) {
super(ClusterManagerMBean.class, false);
_mshostVo = mshostVo;
}
public long getMsid() {
return _mshostVo.getMsid();
}
public String getLastUpdateTime() {
Date date = _mshostVo.getLastUpdateTime();
return DateUtil.getDateDisplayString(TimeZone.getDefault(), date);
}
public String getClusterNodeIP() {
return _mshostVo.getServiceIP();
}
public String getVersion() {
return _mshostVo.getVersion();
}
}