|
Brooklyn | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectbrooklyn.event.feed.AbstractFeed
brooklyn.event.feed.jmx.JmxFeed
public class JmxFeed extends AbstractFeed
Provides a feed of attribute values, by polling or subscribing over jmx. Example usage (e.g. in an entity that extends SoftwareProcessImpl):
private JmxFeed feed;
//@Override
protected void connectSensors() {
super.connectSensors();
feed = JmxFeed.builder()
.entity(this)
.period(500, TimeUnit.MILLISECONDS)
.pollAttribute(new JmxAttributePollConfig(ERROR_COUNT)
.objectName(requestProcessorMbeanName)
.attributeName("errorCount"))
.pollAttribute(new JmxAttributePollConfig(SERVICE_UP)
.objectName(serverMbeanName)
.attributeName("Started")
.onError(Functions.constant(false)))
.build();
{| Nested Class Summary | |
|---|---|
static class |
JmxFeed.Builder
|
| Field Summary | |
|---|---|
static long |
JMX_CONNECTION_TIMEOUT_MS
|
static Logger |
log
|
| Fields inherited from class AbstractFeed | |
|---|---|
| entity, poller |
| Method Summary | |
|---|---|
protected java.lang.Object
|
JmxFeed(JmxFeed.Builder builder)
|
static JmxFeed.Builder
|
builder()
|
java.lang.String
|
getJmxUri()
|
protected Poller
|
getPoller()
|
protected boolean
|
isConnected()
|
protected void
|
postStop()
|
protected void
|
preStart()
|
protected void
|
preStop()
|
| Methods inherited from class AbstractFeed | |
|---|---|
| getEntity, isActivated, isActive, isConnected, postStop, preStart, preStop, resume, start, stop, suspend |
| Field Detail |
|---|
public static final long JMX_CONNECTION_TIMEOUT_MS
public static final Logger log
| Method Detail |
|---|
protected java.lang.Object JmxFeed(JmxFeed.Builder builder)
public static JmxFeed.Builder builder()
public java.lang.String getJmxUri()
@SuppressWarnings("unchecked")
protected Poller
protected boolean isConnected() {
protected boolean isConnected()
} protected void postStop()
protected void preStart() {
protected void preStart()
for (Map.Entryentry : notificationListeners.entries()) { protected void preStop()
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.