@Test public void testJmxAttributeOfTypeTabularDataProviderConvertedToMap() throws Exception { CompositeType compositeType = new CompositeType( "typeName", "description", new String[] {"myint", "mystring", "mybool"}, new String[] {"myint", "mystring", "mybool"}, new OpenType<?>[] {SimpleType.INTEGER, SimpleType.STRING, SimpleType.BOOLEAN} ); TabularType tt = new TabularType( "typeName", "description", compositeType, new String[] {"myint"} ); TabularDataSupport tds = new TabularDataSupport(tt); tds.put(new CompositeDataSupport( compositeType, new String[] {"mybool", "myint", "mystring"}, new Object[] {true, 1234, "on"} )); GeneralisedDynamicMBean mbean = jmxService.registerMBean(ImmutableMap.of(attributeName, tds), objectName); feed = JmxFeed.builder() .entity(entity) .pollAttribute(new JmxAttributePollConfig<Map>(mapAttribute) .objectName(objectName) .attributeName(attributeName) .onSuccess((Function)JmxValueFunctions.tabularDataToMap())) .build(); assertSensorEventually( mapAttribute, ImmutableMap.of("myint", 1234, "mystring", "on", "mybool", Boolean.TRUE), TIMEOUT_MS); }
public static Builder builder() { return new Builder(); }
JmxFeed extends AbstractFeed { public static Builder builder() { return new Builder(); } }
JmxFeed extends AbstractFeed { public static Builder builder() { return new Builder(); } JmxFeed(); protected  JmxFeed(Builder builder); }
JmxFeed extends AbstractFeed { public static Builder builder() { return new Builder(); } JmxFeed(); protected  JmxFeed(Builder builder); static Builder builder(); @Override void setEntity(EntityLocal entity); String getJmxUri(); @Override String toString(); }
JmxFeed extends AbstractFeed { public static Builder builder() { return new Builder(); } JmxFeed(); protected  JmxFeed(Builder builder); static Builder builder(); @Override void setEntity(EntityLocal entity); String getJmxUri(); @Override String toString(); static final Logger log; static final long JMX_CONNECTION_TIMEOUT_MS; static final ConfigKey<JmxHelper> HELPER; static final ConfigKey<Boolean> OWN_HELPER; static final ConfigKey<String> JMX_URI; static final ConfigKey<Long> JMX_CONNECTION_TIMEOUT; @SuppressWarnings("serial")
    static final ConfigKey<SetMultimap<String, JmxAttributePollConfig<?>>> ATTRIBUTE_POLLS; @SuppressWarnings("serial")
    static final ConfigKey<SetMultimap<List<?>, JmxOperationPollConfig<?>>> OPERATION_POLLS; @SuppressWarnings("serial")
    static final ConfigKey<SetMultimap<NotificationFilter, JmxNotificationSubscriptionConfig<?>>> NOTIFICATION_SUBSCRIPTIONS; }