Interface IDebug

  • All Known Implementing Classes:
    DebugImpl

    public interface IDebug

    Allows 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.IDebugProvider interface together provide the necessary functionality to replace or enhance the Debug service.

    • 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 IDebug instance
      • 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 class com.iplanet.am.util.Debug. This value could be one of the followings:
        • OFF
        • ERROR
        • WARNING
        • MESSAGE
        • ON
        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 argument level must be an integer exactly equal to one of the debug level integers as defined in the class com.iplanet.am.util.Debug. This value could be one of the following:
        • OFF
        • ERROR
        • WARNING
        • MESSAGE
        • ON
        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 argument level must be a string which should exactly match the string definitions of debug level as defined in the class com.iplanet.am.util.Debug. This value could be one of the following:
        • STR_OFF
        • STR_ERROR
        • STR_WARNING
        • STR_MESSAGE
        • STR_ON
        Parameters:
        level - String representing the debug level to be used by this instance.
      • messageEnabled

        boolean messageEnabled()
        Returns true if the current instance allows logging of MESSAGE level debug messages.
        Returns:
        true if MESSAGE level debugging is enabled.
      • warningEnabled

        boolean warningEnabled()
        Returns true if the current instance allows logging of WARNING level debug messages.
        Returns:
        true if WARNING level debugging is enabled.
      • errorEnabled

        boolean errorEnabled()
        Returns true if the current instances allows logging of ERROR level debug messages.
        Returns:
        true if ERROR level debugging is enabled.
      • message

        void message​(String message,
                     Throwable th)
        Allows the recording of messages if the debug level is set to MESSAGE for this instance.
        Parameters:
        message - Message to be recorded.
        th - The optional java.lang.Throwable which 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 to WARNING or higher for this instance.
        Parameters:
        message - Message to be recorded.
        th - The optional java.lang.Throwable which if present will be used to record the stack trace.
      • error

        void error​(String message,
                   Throwable th)
        Allows the recording of messages if the debug level is set to ERROR or higher for this instance.
        Parameters:
        message - Message to be recorded.
        th - the optional java.lang.Throwable which if present will be used to record the stack trace.