Brooklyn

brooklyn.event.adapter
[Groovy] Class JmxAttributeAdapter

java.lang.Object
  brooklyn.event.adapter.AbstractSensorAdapter
      brooklyn.event.adapter.JmxAttributeAdapter

@InheritConstructors
class JmxAttributeAdapter
extends AbstractSensorAdapter

Adapter that polls for a JMX attribute. "Attribute" here refers to the JMX concept, rather than the brooklyn concept.

See Also:
JmxSensorAdapter


Nested Class Summary
static class JmxAttributeAdapter.AttributePollHelper

 
Field Summary
static Logger log

 
Property Summary
JmxSensorAdapter adapter

java.lang.String attributeName

javax.management.ObjectName objectName

AttributePollHelper poller

 
Constructor Summary
JmxAttributeAdapter(java.util.Map flags = [:], JmxSensorAdapter adapter, javax.management.ObjectName objectName, java.lang.String attributeName)

 
Method Summary
protected void activateAdapter()

void poll(Sensor s, groovy.lang.Closure postProcessing = {it})

optional postProcessing will take the result of the attribute invocation (its native type; casting to sensor's type is done on the return value of the closure)

void subscribe(Sensor s, groovy.lang.Closure postProcessing = {it})

optional postProcessing will take the result of the attribute invocation (its native type; casting to sensor's type is done on the return value of the closure)

 
Methods inherited from class AbstractSensorAdapter
activateAdapter, addActivationLifecycleListeners, deactivateAdapter, isConnected, register
 

Field Detail

log

public static final Logger log


 
Property Detail

adapter

final JmxSensorAdapter adapter


attributeName

final java.lang.String attributeName


objectName

final javax.management.ObjectName objectName


poller

final AttributePollHelper poller


 
Constructor Detail

JmxAttributeAdapter

JmxAttributeAdapter(java.util.Map flags = [:], JmxSensorAdapter adapter, javax.management.ObjectName objectName, java.lang.String attributeName)


 
Method Detail

activateAdapter

@Override
protected void activateAdapter()


poll

void poll(Sensor s, groovy.lang.Closure postProcessing = {it})
optional postProcessing will take the result of the attribute invocation (its native type; casting to sensor's type is done on the return value of the closure)


subscribe

void subscribe(Sensor s, groovy.lang.Closure postProcessing = {it})
optional postProcessing will take the result of the attribute invocation (its native type; casting to sensor's type is done on the return value of the closure)


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.