public class JEDiagnostics extends JEMBean implements 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 MBeanAttributeInfo |
ATT_CONSOLEHANDLER_LEVEL |
protected static MBeanAttributeInfo |
ATT_FILEHANDLER_LEVEL |
protected static String |
CONSOLEHANDLER_LEVEL |
protected static String |
FILEHANDLER_LEVEL |
protected static String |
OP_RESET_LOGGING |
protected static MBeanOperationInfo |
OP_RESET_LOGGING_LEVEL |
protected static 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) |
Object |
getAttribute(String attributeName) |
protected MBeanAttributeInfo[] |
getAttributeList()
Get attribute metadata for this MBean.
|
AttributeList |
getAttributes(String[] attributes) |
protected void |
initClassFields() |
Object |
invoke(String actionName,
Object[] params,
String[] signature) |
void |
setAttribute(Attribute attribute) |
AttributeList |
setAttributes(AttributeList attributes) |
doRegister, doUnregister, getConstructors, getMBeanInfo, getNotificationInfo, getStatsConfig, resetMBeanInfo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMBeanInfo
protected static final String CONSOLEHANDLER_LEVEL
protected static final String FILEHANDLER_LEVEL
protected static final MBeanAttributeInfo ATT_CONSOLEHANDLER_LEVEL
protected static final MBeanAttributeInfo ATT_FILEHANDLER_LEVEL
protected static final String OP_RESET_LOGGING
protected static final MBeanParameterInfo[] resetLoggingParams
protected static final MBeanOperationInfo OP_RESET_LOGGING_LEVEL
protected JEDiagnostics(Environment env)
public JEDiagnostics()
protected void initClassFields()
initClassFields
in class JEMBean
public Object getAttribute(String attributeName) throws AttributeNotFoundException, MBeanException
getAttribute
in interface DynamicMBean
AttributeNotFoundException
MBeanException
DynamicMBean.getAttribute(java.lang.String)
public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException
setAttribute
in interface DynamicMBean
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
DynamicMBean.setAttribute(javax.management.Attribute)
public AttributeList getAttributes(String[] attributes)
getAttributes
in interface DynamicMBean
DynamicMBean.getAttributes(java.lang.String[])
public AttributeList setAttributes(AttributeList attributes)
setAttributes
in interface DynamicMBean
DynamicMBean.setAttributes(javax.management.AttributeList)
public Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException
invoke
in interface DynamicMBean
MBeanException
DynamicMBean.invoke(java.lang.String, java.lang.Object[], java.lang.String[])
protected void doRegisterMBean(Environment env) throws Exception
doRegisterMBean
in class JEMBean
Exception
protected MBeanAttributeInfo[] getAttributeList()
JEMBean
getAttributeList
in class JEMBean
protected void addOperations()
JEMBean
addOperations
in class JEMBean
Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.