org.fusesource.insight.graph
Class JmxCollector

java.lang.Object
  extended by org.fusesource.insight.graph.JmxCollector

public class JmxCollector
extends java.lang.Object

Collects all the charting statistics defined against its profiles


Field Summary
protected static java.lang.String DEFAULT_GRAPH_CLUSTER_NAME
           
static java.lang.String GRAPH_CLUSTER_PREFIX
           
static java.lang.String GRAPH_JSON
           
static int SECONDS_BETWEEN_SERVER_JOB_RUNS
           
 
Constructor Summary
JmxCollector(FabricService fabricService)
           
 
Method Summary
protected  void configureProfileServer(com.googlecode.jmxtrans.model.Server server, Container container, Profile profile)
           
protected  com.googlecode.jmxtrans.OutputWriter createClusterWriter(java.lang.String clusterName)
          Lets look in ZK and see what the definition of the graphing cluster is and create an OutputWriter for that cluster
 void destroy()
           
 java.lang.String getClusterRoot()
           
static com.googlecode.jmxtrans.model.JmxProcess getJmxProcess(java.lang.String name, java.io.InputStream in)
           
 java.util.Map<java.lang.String,org.apache.commons.pool.KeyedObjectPool> getObjectPoolMap()
          Returns the object pool map
 org.quartz.Scheduler getScheduler()
           
 IZKClient getZkClient()
           
protected  void loadProfile(Container container, Profile profile)
           
 void process()
           
 void registerMBeanServer(javax.management.MBeanServer mbeanServer)
           
 void setClusterRoot(java.lang.String clusterRoot)
           
 void setObjectPoolMap(java.util.Map<java.lang.String,org.apache.commons.pool.KeyedObjectPool> poolMap)
           
 void setScheduler(org.quartz.Scheduler scheduler)
           
 void setZkClient(IZKClient zkClient)
           
 void start()
           
 void unregisterMBeanServer(javax.management.MBeanServer mbeanServer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GRAPH_JSON

public static final java.lang.String GRAPH_JSON
See Also:
Constant Field Values

SECONDS_BETWEEN_SERVER_JOB_RUNS

public static int SECONDS_BETWEEN_SERVER_JOB_RUNS

GRAPH_CLUSTER_PREFIX

public static final java.lang.String GRAPH_CLUSTER_PREFIX
See Also:
Constant Field Values

DEFAULT_GRAPH_CLUSTER_NAME

protected static final java.lang.String DEFAULT_GRAPH_CLUSTER_NAME
See Also:
Constant Field Values
Constructor Detail

JmxCollector

public JmxCollector(FabricService fabricService)
Method Detail

start

public void start()
           throws java.io.IOException,
                  com.googlecode.jmxtrans.util.ValidationException,
                  com.googlecode.jmxtrans.util.LifecycleException,
                  org.quartz.SchedulerException,
                  java.text.ParseException
Throws:
java.io.IOException
com.googlecode.jmxtrans.util.ValidationException
com.googlecode.jmxtrans.util.LifecycleException
org.quartz.SchedulerException
java.text.ParseException

destroy

public void destroy()
             throws java.lang.Exception
Throws:
java.lang.Exception

registerMBeanServer

public void registerMBeanServer(javax.management.MBeanServer mbeanServer)

unregisterMBeanServer

public void unregisterMBeanServer(javax.management.MBeanServer mbeanServer)

getScheduler

public org.quartz.Scheduler getScheduler()
                                  throws org.quartz.SchedulerException
Throws:
org.quartz.SchedulerException

setScheduler

public void setScheduler(org.quartz.Scheduler scheduler)

getZkClient

public IZKClient getZkClient()

setZkClient

public void setZkClient(IZKClient zkClient)

getClusterRoot

public java.lang.String getClusterRoot()

setClusterRoot

public void setClusterRoot(java.lang.String clusterRoot)

process

public void process()
             throws com.googlecode.jmxtrans.util.LifecycleException,
                    com.googlecode.jmxtrans.util.ValidationException,
                    org.quartz.SchedulerException,
                    java.text.ParseException
Throws:
com.googlecode.jmxtrans.util.LifecycleException
com.googlecode.jmxtrans.util.ValidationException
org.quartz.SchedulerException
java.text.ParseException

getObjectPoolMap

public java.util.Map<java.lang.String,org.apache.commons.pool.KeyedObjectPool> getObjectPoolMap()
Returns the object pool map


setObjectPoolMap

public void setObjectPoolMap(java.util.Map<java.lang.String,org.apache.commons.pool.KeyedObjectPool> poolMap)

loadProfile

protected void loadProfile(Container container,
                           Profile profile)
                    throws java.io.IOException,
                           com.googlecode.jmxtrans.util.LifecycleException
Throws:
java.io.IOException
com.googlecode.jmxtrans.util.LifecycleException

configureProfileServer

protected void configureProfileServer(com.googlecode.jmxtrans.model.Server server,
                                      Container container,
                                      Profile profile)
                               throws com.googlecode.jmxtrans.util.LifecycleException
Throws:
com.googlecode.jmxtrans.util.LifecycleException

createClusterWriter

protected com.googlecode.jmxtrans.OutputWriter createClusterWriter(java.lang.String clusterName)
                                                            throws com.googlecode.jmxtrans.util.LifecycleException
Lets look in ZK and see what the definition of the graphing cluster is and create an OutputWriter for that cluster

Throws:
com.googlecode.jmxtrans.util.LifecycleException

getJmxProcess

public static com.googlecode.jmxtrans.model.JmxProcess getJmxProcess(java.lang.String name,
                                                                     java.io.InputStream in)
                                                              throws org.codehaus.jackson.JsonParseException,
                                                                     org.codehaus.jackson.map.JsonMappingException,
                                                                     java.io.IOException
Throws:
org.codehaus.jackson.JsonParseException
org.codehaus.jackson.map.JsonMappingException
java.io.IOException


Copyright © 2013 Red Hat. All Rights Reserved.