Search in sources :

Example 6 with Kernel

use of org.neo4j.jmx.Kernel in project neo4j by neo4j.

the class Dbinfo method getDescription.

@Override
public String getDescription() {
    final Kernel kernel;
    try {
        kernel = getKernel();
    } catch (ShellException e) {
        return e.getMessage();
    }
    MBeanServer mbeans = getPlatformMBeanServer();
    StringBuilder result = new StringBuilder("Get runtime information about the Graph Database.\n" + "This uses the Neo4j management beans to get" + " information about the Graph Database.\n\n");
    availableBeans(mbeans, kernel, result);
    result.append("\n");
    getUsage(result);
    return result.toString();
}
Also used : Kernel(org.neo4j.jmx.Kernel) ShellException(org.neo4j.shell.ShellException) ManagementFactory.getPlatformMBeanServer(java.lang.management.ManagementFactory.getPlatformMBeanServer) MBeanServer(javax.management.MBeanServer)

Example 7 with Kernel

use of org.neo4j.jmx.Kernel in project neo4j by neo4j.

the class Neo4jManager method allBeans.

@Override
public List<Object> allBeans() {
    List<Object> beans = super.allBeans();
    Kernel kernel = null;
    for (Object bean : beans) {
        if (bean instanceof Kernel) {
            kernel = (Kernel) bean;
        }
    }
    if (kernel != null) {
        beans.remove(kernel);
    }
    return beans;
}
Also used : Kernel(org.neo4j.jmx.Kernel)

Aggregations

Kernel (org.neo4j.jmx.Kernel)7 ShellException (org.neo4j.shell.ShellException)3 ManagementFactory.getPlatformMBeanServer (java.lang.management.ManagementFactory.getPlatformMBeanServer)2 RemoteException (java.rmi.RemoteException)2 MBeanServer (javax.management.MBeanServer)2 Test (org.junit.Test)2 JSONException (org.neo4j.shell.util.json.JSONException)2 Hashtable (java.util.Hashtable)1 Iterator (java.util.Iterator)1 MBeanAttributeInfo (javax.management.MBeanAttributeInfo)1 ObjectName (javax.management.ObjectName)1 JmxKernelExtension (org.neo4j.jmx.impl.JmxKernelExtension)1 GraphDatabaseAPI (org.neo4j.kernel.internal.GraphDatabaseAPI)1 JSONObject (org.neo4j.shell.util.json.JSONObject)1