Java Code Examples for javax.management.MBeanAttributeInfo.getType()

The following are Jave code examples for showing how to use getType() of the javax.management.MBeanAttributeInfo class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: eZooKeeper   File: MBeanAttributeModelElementType.java   Source Code and License Vote up 5 votes
@Override
public String getColumnText(Object element, int columnIndex) {

    // 0:Name | 1:Value | 2:Type | 3:Description

    MBeanAttributeModel model = (MBeanAttributeModel) element;
    MBeanAttribute mbeanAttribute = model.getData();
    MBeanAttributeInfo info = mbeanAttribute.getInfo();
    switch (columnIndex) {

    case 0:
        return mbeanAttribute.getName();

    case 1:

        String valueError = mbeanAttribute.getValueRetrievalErrorMessage();
        if (valueError != null) {
            return valueError;
        }
        else {
            return mbeanAttribute.getValueAsString();
        }

    case 2:
        return info.getType();

    case 3:
        return info.getDescription();

    }

    return null;
}