public final class CommonDiagnosable extends AbstractDiagnosable
These classes should implement Diagnosable interface and override its getDiagnosable() method which should return an instance of this class. This is a singleton class which means all classes using common diagnosable share same diagnosable instance.
Below example shows how to use this Common Diagnosable for logging:
{@code
class XYZ implements Diagnosable {diagnostic, IS_VALID_BOOLEAN_STRING, IS_VALID_BUFFER_SIZE, IS_VALID_LOGGER_NAME| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDiagnosticLoggerName() |
static Diagnosable |
getInstance()
Returns the singleton instance of common diagnosable.
|
protected TraceAttributes |
getTraceAttributes() |
boolean |
isDebugEnabled()
Returns true if debug is enabled.
|
boolean |
isDiagnoseFirstFailureEnabled()
Returns true if Diagnose First Failure is enabled.
|
protected boolean |
isSensitivePermitted() |
void |
propertyChange(PropertyChangeEvent event)
This method gets called when a MBean operation is invoked.
|
void |
setDebugEnabled(boolean enabled) |
void |
setDiagnoseFirstFailureEnabled(boolean enabled) |
abstractPropertyChange, begin, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debugp, enableDiagnoseFirstFailureDump, enableGlobalDebug, enableMetrics, enableWriteLogsToDiagnoseFirstFailure, end, getSystemProperty, isGlobalDebugEnabled, isLoggable, isMetricsEnabled, isSensitiveEnabled, isWriteLogsToDiagnoseFirstFailureEnabled, onClose, onConfigFileChange, resumeLogging, secure, setSensitiveEnabled, suspendLogging, trace, tracepclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbeginCurrentSql, endCurrentSql, format, getDiagnosablepublic static Diagnosable getInstance()
public final void setDebugEnabled(boolean enabled)
setDebugEnabled in class AbstractDiagnosablepublic final void setDiagnoseFirstFailureEnabled(boolean enabled)
setDiagnoseFirstFailureEnabled in class AbstractDiagnosableprotected boolean isSensitivePermitted()
isSensitivePermitted in class AbstractDiagnosablepublic java.lang.String getDiagnosticLoggerName()
getDiagnosticLoggerName in class AbstractDiagnosableprotected TraceAttributes getTraceAttributes()
getTraceAttributes in class AbstractDiagnosablepublic void propertyChange(PropertyChangeEvent event)
Diagnosableevent - A PropertyChangeEvent object describing the event source
and the property that has changed.public final boolean isDebugEnabled()
Diagnosablepublic final boolean isDiagnoseFirstFailureEnabled()
Diagnosable