public class JSONBean extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
JSONBean.Writer
Use dumping out mbeans as JSON.
|
Modifier and Type | Field and Description |
---|---|
private org.codehaus.jackson.JsonFactory |
jsonFactory |
private static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
JSONBean() |
Modifier and Type | Method and Description |
---|---|
static void |
dumpAllBeans()
Dump out all registered mbeans as json on System.out.
|
static String |
dumpRegionServerMetrics()
Dump out a subset of regionserver mbeans only, not all of them, as json on System.out.
|
static void |
main(String[] args) |
JSONBean.Writer |
open(PrintWriter writer) |
private static int |
write(org.codehaus.jackson.JsonGenerator jg,
MBeanServer mBeanServer,
ObjectName qry,
String attribute,
boolean description) |
private static void |
writeAttribute(org.codehaus.jackson.JsonGenerator jg,
MBeanServer mBeanServer,
ObjectName oname,
boolean description,
MBeanAttributeInfo attr) |
private static void |
writeAttribute(org.codehaus.jackson.JsonGenerator jg,
String attName,
String descriptionStr,
Object value) |
private static void |
writeObject(org.codehaus.jackson.JsonGenerator jg,
boolean description,
Object value) |
private static final org.apache.commons.logging.Log LOG
private final org.codehaus.jackson.JsonFactory jsonFactory
public JSONBean.Writer open(PrintWriter writer) throws IOException
IOException
private static int write(org.codehaus.jackson.JsonGenerator jg, MBeanServer mBeanServer, ObjectName qry, String attribute, boolean description) throws IOException
mBeanServer
- qry
- attribute
- description
- IOException
private static void writeAttribute(org.codehaus.jackson.JsonGenerator jg, MBeanServer mBeanServer, ObjectName oname, boolean description, MBeanAttributeInfo attr) throws IOException
IOException
private static void writeAttribute(org.codehaus.jackson.JsonGenerator jg, String attName, String descriptionStr, Object value) throws IOException
IOException
private static void writeObject(org.codehaus.jackson.JsonGenerator jg, boolean description, Object value) throws IOException
IOException
public static String dumpRegionServerMetrics() throws MalformedObjectNameException, IOException
public static void dumpAllBeans() throws IOException, MalformedObjectNameException
public static void main(String[] args) throws IOException, MalformedObjectNameException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.