JBossMX Parent POM 6.0.0.GA

org.jboss.mx.metadata
Class MBeanInfoConversion

java.lang.Object
  extended by org.jboss.mx.metadata.MBeanInfoConversion
All Implemented Interfaces:
ModelMBeanConstants

public class MBeanInfoConversion
extends Object
implements ModelMBeanConstants

Routines for converting MBeanInfo to ModelMBeanInfoSupport and stripping ModelMBeanOperationInfos that are referred to in ModelMBeanAttributeInfos.

Version:
$Revision: 85671 $
Author:
Juha Lindfors.

Field Summary
 
Fields inherited from interface org.jboss.mx.modelmbean.ModelMBeanConstants
ACTION, ACTION_INFO, ALL_DESCRIPTORS, ATTRIBUTE_DESCRIPTOR, ATTRIBUTE_VALUE, CACHE_ALWAYS, CACHE_ALWAYS_LIMIT, CACHE_NEVER, CACHE_NEVER_LIMIT, CACHED_VALUE, CLASS, CONSTRUCTOR_DESCRIPTOR, CURRENCY_TIME_LIMIT, DEFAULT, DELEGATING_PM_OPERATION_DEFAULT_VALUE, DELEGATING_PM_OPERATION_DESCRIPTOR, DELEGATING_PM_SERVICE_DEFAULT_VALUE, DELEGATING_PM_SERVICE_DESCRIPTOR, DESCRIPTOR_TYPE, DISPLAY_NAME, EXPORT, GENERIC_MODELMBEAN_NOTIFICATION, GET_METHOD, HIGH_VISIBILITY, INFO, INTERCEPTORS, IS_IS, IS_READABLE, IS_WRITABLE, LAST_RETURNED_TIME_STAMP, LAST_UPDATED_TIME_STAMP, LAST_UPDATED_TIME_STAMP2, LOG, LOG_FILE, LOW_VISIBILITY, MBEAN_DESCRIPTOR, MBEAN_INFO_INJECTION_TYPE, MBEAN_SERVER_INJECTION_TYPE, MESSAGE_ID, MINIMAL_VISIBILITY, NAME, NORMAL_VISIBILITY, NOTIFICATION_DESCRIPTOR, OBJECT_NAME, OBJECT_NAME_INJECTION_TYPE, OBJECT_REF, OPERATION_DESCRIPTOR, PERSIST_INFO, PERSIST_LOCATION, PERSIST_NAME, PERSIST_PERIOD, PERSIST_POLICIES, PERSIST_POLICY, PERSISTENCE_MANAGER, PP_ALWAYS, PP_NEVER, PP_NO_MORE_OFTEN_THAN, PP_ON_TIMER, PP_ON_UPDATE, PRESENTATION_STRING, PROTOCOL_MAP, RESOURCE_CLASS, ROLE, ROLE_CONSTRUCTOR, ROLE_GETTER, ROLE_OPERATION, ROLE_SETTER, SET_METHOD, SEVERITY, SEVERITY_CRITICAL, SEVERITY_MAJOR, SEVERITY_MINOR, SEVERITY_NON_RECOVERABLE, SEVERITY_NORMAL, SEVERITY_UNKNOWN, SEVERITY_WARNING, TARGET_OBJECT, TARGET_TYPE, VISIBILITY
 
Constructor Summary
MBeanInfoConversion()
           
 
Method Summary
static ModelMBeanInfoSupport stripAttributeOperations(ModelMBeanInfo info, boolean stripAllRoles)
          Returns a ModelMBeanInfoSupport where ModelMBeanOperationInfos that are referred to by ModelMBeanAttributeInfo getMethod or setMethod descriptor fields are stripped out.
static ModelMBeanInfoSupport toModelMBeanInfo(MBeanInfo info)
          Convert regular MBeanInfo into ModelMBeanInfo.
static ModelMBeanInfoSupport toModelMBeanInfo(MBeanInfo info, boolean createAttributeOperationMapping)
          Convert regular MBeanInfo to ModelMBeanInfo.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MBeanInfoConversion

public MBeanInfoConversion()
Method Detail

toModelMBeanInfo

public static ModelMBeanInfoSupport toModelMBeanInfo(MBeanInfo info)
Convert regular MBeanInfo into ModelMBeanInfo.

Parameters:
info - MBeanInfo to convert (such as the Standard MBean info)
Returns:
the model mbean info

toModelMBeanInfo

public static ModelMBeanInfoSupport toModelMBeanInfo(MBeanInfo info,
                                                     boolean createAttributeOperationMapping)
Convert regular MBeanInfo to ModelMBeanInfo.

Parameters:
info - MBeanInfo to convert (such a the Standard MBean info)
createAttributeOperationMapping - setting this boolean to true will automatically create the attribute operation mapping for Model MBean managemenet attributes. Based on the Standard MBean attribute naming conventions, the Model MBean attribute descriptors are mapped to appropriate management operations with the getMethod and setMethod descriptor fields.
Returns:
the modelmbean info

stripAttributeOperations

public static ModelMBeanInfoSupport stripAttributeOperations(ModelMBeanInfo info,
                                                             boolean stripAllRoles)
                                                      throws MBeanException
Returns a ModelMBeanInfoSupport where ModelMBeanOperationInfos that are referred to by ModelMBeanAttributeInfo getMethod or setMethod descriptor fields are stripped out. If the stripAllRoles parameter is true then all the referred-to operations will be stripped. Otherwise only referred-to operations with a role of "getter" or "setter" will be stripped.

Parameters:
info - the original info
stripAllRoles - see text
Returns:
the modelmbean info
Throws:
MBeanException - why?

JBossMX Parent POM 6.0.0.GA

Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.