@Test public void testJmxOperationWithArgPolledForSensor() throws Exception { MBeanParameterInfo paramInfo = new MBeanParameterInfo("param1", String.class.getName(), "my param1"); MBeanParameterInfo[] paramInfos = new MBeanParameterInfo[] {paramInfo}; MBeanOperationInfo opInfo = new MBeanOperationInfo(opName, "my descr", paramInfos, String.class.getName(), MBeanOperationInfo.ACTION); GeneralisedDynamicMBean mbean = jmxService.registerMBean( Collections.emptyMap(), ImmutableMap.of(opInfo, new Function<Object[], String>() { public String apply(Object[] args) { return args[0]+"suffix"; }}), objectName); feed = JmxFeed.builder() .entity(entity) .pollOperation(new JmxOperationPollConfig<String>(stringAttribute) .objectName(objectName) .operationName(opName) .operationParams(ImmutableList.of("myprefix"))) .build(); assertSensorEventually(stringAttribute, "myprefix"+"suffix", 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; }