@InterfaceAudience.Private public class JSONBean extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
JSONBean.Writer
Use dumping out mbeans as JSON.
|
| 构造器和说明 |
|---|
JSONBean() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
dumpAllBeans()
Dump out all registered mbeans as json on System.out.
|
JSONBean.Writer |
open(PrintWriter writer)
Notice that, closing the return
JSONBean.Writer will not close the writer passed in, you
still need to close the writer by yourself. |
public JSONBean.Writer open(PrintWriter writer) throws IOException
JSONBean.Writer will not close the writer passed in, you
still need to close the writer by yourself.
This is because that, we can only finish the json after you call Closeable.close(). So if
we just close the writer, you can write nothing after finished the json.IOExceptionpublic static void dumpAllBeans()
throws IOException,
MalformedObjectNameException
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.