Package com.sun.identity.shared.debug
Interface IDebug
-
- All Known Implementing Classes:
DebugImpl
public interface IDebugAllows a pluggable implementation of the Debug service within the Access Manager SDK. The implementation of this interface as well as the
com.sun.identity.shared.debug.IDebugProviderinterface together provide the necessary functionality to replace or enhance the Debug service.
-
-
Field Summary
Fields Modifier and Type Field Description static intERRORDeprecated.useDebugLevelinstead.static intMESSAGEDeprecated.useDebugLevelinstead.static intOFFDeprecated.useDebugLevelinstead.static intONDeprecated.useDebugLevelinstead.static StringSTR_ERRORDeprecated.useDebugLevelinstead.static StringSTR_MESSAGEDeprecated.useDebugLevelinstead.static StringSTR_OFFDeprecated.useDebugLevelinstead.static StringSTR_ONDeprecated.useDebugLevelinstead.static StringSTR_WARNINGDeprecated.useDebugLevelinstead.static intWARNINGDeprecated.useDebugLevelinstead.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiderror(String message, Throwable th)Allows the recording of messages if the debug level is set toERRORor higher for this instance.booleanerrorEnabled()Returnstrueif the current instances allows logging ofERRORlevel debug messages.StringgetName()Returns the name of the IDebug instance.intgetState()Returns current debug level used by this instance.voidmessage(String message, Throwable th)Allows the recording of messages if the debug level is set toMESSAGEfor this instance.booleanmessageEnabled()Returnstrueif the current instance allows logging ofMESSAGElevel debug messages.voidresetDebug(String mf)Allows runtime modification of the backend used by this instance.voidsetDebug(int level)Allows runtime modification of the debug level used by this instance.voidsetDebug(String level)Allows runtime modification of the debug level used by this instance.voidwarning(String message, Throwable th)Allows the recording of messages if the debug level is set toWARNINGor higher for this instance.booleanwarningEnabled()Returnstrueif the current instance allows logging ofWARNINGlevel debug messages.
-
-
-
Field Detail
-
OFF
@Deprecated static final int OFF
Deprecated.useDebugLevelinstead.
-
ERROR
@Deprecated static final int ERROR
Deprecated.useDebugLevelinstead.
-
WARNING
@Deprecated static final int WARNING
Deprecated.useDebugLevelinstead.
-
MESSAGE
@Deprecated static final int MESSAGE
Deprecated.useDebugLevelinstead.
-
ON
@Deprecated static final int ON
Deprecated.useDebugLevelinstead.
-
STR_OFF
@Deprecated static final String STR_OFF
Deprecated.useDebugLevelinstead.
-
STR_ERROR
@Deprecated static final String STR_ERROR
Deprecated.useDebugLevelinstead.
-
STR_WARNING
@Deprecated static final String STR_WARNING
Deprecated.useDebugLevelinstead.
-
STR_MESSAGE
@Deprecated static final String STR_MESSAGE
Deprecated.useDebugLevelinstead.
-
STR_ON
@Deprecated static final String STR_ON
Deprecated.useDebugLevelinstead.
-
-
Method Detail
-
getName
String getName()
Returns the name of the IDebug instance. The value is exactly equal to the one that was first used to create this instance.- Returns:
- name of this
IDebuginstance
-
getState
int getState()
Returns current debug level used by this instance. The value is an integer equals to one of the various debug level integers as defined in the classcom.iplanet.am.util.Debug. This value could be one of the followings:OFFERRORWARNINGMESSAGEON
- Returns:
- an integer indicating the debug level used by this instance.
-
setDebug
void setDebug(int level)
Allows runtime modification of the debug level used by this instance. The argumentlevelmust be an integer exactly equal to one of the debug level integers as defined in the classcom.iplanet.am.util.Debug. This value could be one of the following:
OFFERRORWARNINGMESSAGEON
- Parameters:
level- An integer indicating the debug level to be used by this instance.
-
resetDebug
void resetDebug(String mf)
Allows runtime modification of the backend used by this instance. by resetting the debug instance to reinitialize itself. NB : The debug file associated with this debug won't be closed. Because of merge, a debug file could be used by more than one debug instances.- Parameters:
mf- merge flag, on to create a single debug file
-
setDebug
void setDebug(String level)
Allows runtime modification of the debug level used by this instance. The argumentlevelmust be a string which should exactly match the string definitions of debug level as defined in the classcom.iplanet.am.util.Debug. This value could be one of the following:STR_OFFSTR_ERRORSTR_WARNINGSTR_MESSAGESTR_ON
- Parameters:
level- String representing the debug level to be used by this instance.
-
messageEnabled
boolean messageEnabled()
Returnstrueif the current instance allows logging ofMESSAGElevel debug messages.- Returns:
trueifMESSAGElevel debugging is enabled.
-
warningEnabled
boolean warningEnabled()
Returnstrueif the current instance allows logging ofWARNINGlevel debug messages.- Returns:
trueifWARNINGlevel debugging is enabled.
-
errorEnabled
boolean errorEnabled()
Returnstrueif the current instances allows logging ofERRORlevel debug messages.- Returns:
trueifERRORlevel debugging is enabled.
-
message
void message(String message, Throwable th)
Allows the recording of messages if the debug level is set toMESSAGEfor this instance.- Parameters:
message- Message to be recorded.th- The optionaljava.lang.Throwablewhich if present will be used to record the stack trace.
-
warning
void warning(String message, Throwable th)
Allows the recording of messages if the debug level is set toWARNINGor higher for this instance.- Parameters:
message- Message to be recorded.th- The optionaljava.lang.Throwablewhich if present will be used to record the stack trace.
-
-