public class JEDiagnostics extends JEMBean implements javax.management.DynamicMBean
JEDiagnostics is a debugging mbean for a non replicated JE Environment. This is intended as a locus of field support functionality. While it may be used by the application developer, the primary use case is for a support situation. Currently much of this functionality is also available through the standard java.util.logging MBean.
It is a concrete MBean created by registering a JE Environment as an MBean through setting the JEDiagnostics system property. It only works on an active JE Environment, and one Environment can only have one JEDiagnostics instance. There are two attributes and one operation:
Attributes:
We can use these attributes and operations to dynamically change the logging level for debugging purposes.
| Modifier and Type | Field and Description |
|---|---|
protected static javax.management.MBeanAttributeInfo |
ATT_CONSOLEHANDLER_LEVEL |
protected static javax.management.MBeanAttributeInfo |
ATT_FILEHANDLER_LEVEL |
protected static java.lang.String |
CONSOLEHANDLER_LEVEL |
protected static java.lang.String |
FILEHANDLER_LEVEL |
protected static java.lang.String |
OP_RESET_LOGGING |
protected static javax.management.MBeanOperationInfo |
OP_RESET_LOGGING_LEVEL |
protected static javax.management.MBeanParameterInfo[] |
resetLoggingParams |
className, currentClass, DESCRIPTION, env, jeName, operationList, server, statParams| Modifier | Constructor and Description |
|---|---|
|
JEDiagnostics() |
protected |
JEDiagnostics(Environment env) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addOperations()
Add MBean operations into the list.
|
protected void |
doRegisterMBean(Environment env) |
java.lang.Object |
getAttribute(java.lang.String attributeName) |
protected javax.management.MBeanAttributeInfo[] |
getAttributeList()
Get attribute metadata for this MBean.
|
javax.management.AttributeList |
getAttributes(java.lang.String[] attributes) |
protected void |
initClassFields() |
java.lang.Object |
invoke(java.lang.String actionName,
java.lang.Object[] params,
java.lang.String[] signature) |
void |
setAttribute(javax.management.Attribute attribute) |
javax.management.AttributeList |
setAttributes(javax.management.AttributeList attributes) |
doRegister, doUnregister, getConstructors, getMBeanInfo, getNotificationInfo, getStatsConfig, resetMBeanInfoprotected static final java.lang.String CONSOLEHANDLER_LEVEL
protected static final java.lang.String FILEHANDLER_LEVEL
protected static final javax.management.MBeanAttributeInfo ATT_CONSOLEHANDLER_LEVEL
protected static final javax.management.MBeanAttributeInfo ATT_FILEHANDLER_LEVEL
protected static final java.lang.String OP_RESET_LOGGING
protected static final javax.management.MBeanParameterInfo[] resetLoggingParams
protected static final javax.management.MBeanOperationInfo OP_RESET_LOGGING_LEVEL
protected JEDiagnostics(Environment env)
public JEDiagnostics()
protected void initClassFields()
initClassFields in class JEMBeanpublic java.lang.Object getAttribute(java.lang.String attributeName)
throws javax.management.AttributeNotFoundException,
javax.management.MBeanException
getAttribute in interface javax.management.DynamicMBeanjavax.management.AttributeNotFoundExceptionjavax.management.MBeanExceptionDynamicMBean.getAttribute(java.lang.String)public void setAttribute(javax.management.Attribute attribute)
throws javax.management.AttributeNotFoundException,
javax.management.InvalidAttributeValueException,
javax.management.MBeanException
setAttribute in interface javax.management.DynamicMBeanjavax.management.AttributeNotFoundExceptionjavax.management.InvalidAttributeValueExceptionjavax.management.MBeanExceptionDynamicMBean.setAttribute(javax.management.Attribute)public javax.management.AttributeList getAttributes(java.lang.String[] attributes)
getAttributes in interface javax.management.DynamicMBeanDynamicMBean.getAttributes(java.lang.String[])public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
setAttributes in interface javax.management.DynamicMBeanDynamicMBean.setAttributes(javax.management.AttributeList)public java.lang.Object invoke(java.lang.String actionName,
java.lang.Object[] params,
java.lang.String[] signature)
throws javax.management.MBeanException
invoke in interface javax.management.DynamicMBeanjavax.management.MBeanExceptionDynamicMBean.invoke(java.lang.String, java.lang.Object[], java.lang.String[])protected void doRegisterMBean(Environment env) throws java.lang.Exception
doRegisterMBean in class JEMBeanjava.lang.Exceptionprotected javax.management.MBeanAttributeInfo[] getAttributeList()
JEMBeangetAttributeList in class JEMBeanprotected void addOperations()
JEMBeanaddOperations in class JEMBeanCopyright (c) 2002, 2017 Oracle and/or its affiliates. All rights reserved.