@Override public MBeanInfo getMBeanInfo() { return m_modelMBeanInfo == null ? null : (MBeanInfo) m_modelMBeanInfo.clone(); }
@Override public void setModelMBeanInfo(ModelMBeanInfo modelMBeanInfo) throws MBeanException, RuntimeOperationsException { if (modelMBeanInfo == null) throw new RuntimeOperationsException(new IllegalArgumentException( "ModelMBeanInfo cannot be null.")); if (!isModelMBeanInfoValid(modelMBeanInfo)) throw new RuntimeOperationsException(new IllegalArgumentException( "ModelMBeanInfo is invalid.")); m_modelMBeanInfo = (ModelMBeanInfo) modelMBeanInfo.clone(); Logger logger = getLogger(); if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("ModelMBeanInfo successfully set to: " + m_modelMBeanInfo); // Only now the MBean can be registered in the MBeanServer m_canBeRegistered = true; }
/** * Return the <code>MBeanInfo</code> object for this MBean. */ public MBeanInfo getMBeanInfo() { // XXX Why do we have to clone ? if( info== null ) return null; return ((MBeanInfo) info.clone()); }
public MBeanInfo getMBeanInfo() { return m_modelMBeanInfo == null ? null : (MBeanInfo)m_modelMBeanInfo.clone(); }
public MBeanInfo getMBeanInfo() { return m_modelMBeanInfo == null ? null : (MBeanInfo)m_modelMBeanInfo.clone(); }
/** * Initialize the <code>ModelMBeanInfo</code> associated with this * <code>ModelMBean</code>. After the information and associated * descriptors have been customized, the <code>ModelMBean</code> should * be registered with the associated <code>MBeanServer</code>. * * Currently the model can be set after registration. This behavior is * deprecated and won't be supported in future versions. * * @param info The ModelMBeanInfo object to be used by this ModelMBean * * @exception MBeanException If an exception occurs recording this * ModelMBeanInfo information * @exception RuntimeOperations if the specified parameter is * <code>null</code> or invalid */ public void setModelMBeanInfo(ModelMBeanInfo info) throws MBeanException, RuntimeOperationsException { if (info == null) throw new RuntimeOperationsException (new IllegalArgumentException("ModelMBeanInfo is null"), "ModelMBeanInfo is null"); if (!isModelMBeanInfoValid(info)) throw new RuntimeOperationsException (new IllegalArgumentException("ModelMBeanInfo is invalid"), "ModelMBeanInfo is invalid"); this.info = (ModelMBeanInfo) info.clone(); }
public void setModelMBeanInfo(ModelMBeanInfo modelMBeanInfo) throws MBeanException, RuntimeOperationsException { if (modelMBeanInfo == null) throw new RuntimeOperationsException(new IllegalArgumentException(LocalizedStrings.MX4JModelMBean_MODELMBEANINFO_CANNOT_BE_NULL.toLocalizedString())); if (!isModelMBeanInfoValid(modelMBeanInfo)) throw new RuntimeOperationsException(new IllegalArgumentException(LocalizedStrings.MX4JModelMBean_MODELMBEANINFO_IS_INVALID.toLocalizedString())); m_modelMBeanInfo = (ModelMBeanInfo)modelMBeanInfo.clone(); Logger logger = getLogger(); if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("ModelMBeanInfo successfully set to: " + m_modelMBeanInfo); // Only now the MBean can be registered in the MBeanServer m_canBeRegistered = true; }
public void setModelMBeanInfo(ModelMBeanInfo modelMBeanInfo) throws MBeanException, RuntimeOperationsException { if (modelMBeanInfo == null) throw new RuntimeOperationsException(new IllegalArgumentException(LocalizedStrings.MX4JModelMBean_MODELMBEANINFO_CANNOT_BE_NULL.toLocalizedString())); if (!isModelMBeanInfoValid(modelMBeanInfo)) throw new RuntimeOperationsException(new IllegalArgumentException(LocalizedStrings.MX4JModelMBean_MODELMBEANINFO_IS_INVALID.toLocalizedString())); m_modelMBeanInfo = (ModelMBeanInfo)modelMBeanInfo.clone(); Logger logger = getLogger(); if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("ModelMBeanInfo successfully set to: " + m_modelMBeanInfo); // Only now the MBean can be registered in the MBeanServer m_canBeRegistered = true; }