class MBeanHelper {

    public Map<String, String> get(ObjectName bean, Collection<String> attrs) throws Exception {
        Map<String, MBeanAttributeInfo> attrInfos = getAttributeInfos(bean, attrs, true, false);
        Map<String, Object> attrRawValues = getAttributes(bean, attrs);
        Map<String, String> attrValues = new HashMap<String, String>(attrs.size());
        for(String attr: attrs) {
            String attrValue = format(attrRawValues.get(attr), attrInfos.get(attr).getType());
            attrValues.put(attr, attrValue);
        }
        return attrValues;
    }

    public  MBeanHelper(MBeanServerConnection connection);

}