Package 

Class BacktraceWatchdog

    • Constructor Detail

      • BacktraceWatchdog

        BacktraceWatchdog(BacktraceClient client, boolean sendException)
        Initialize new instance of BacktraceWatchdog
        Parameters:
        client - current Backtrace client instance which will be used to send information about exception
        sendException - whether to make a request to the server with information about the error
    • Method Detail

      • setOnApplicationNotRespondingEvent

         void setOnApplicationNotRespondingEvent(OnApplicationNotRespondingEvent onApplicationNotRespondingEvent)

        Set event that will be executed instead of the default sending of the error information to the Backtrace console

        Parameters:
        onApplicationNotRespondingEvent - event that will be executed instead of the default sending of the error information to the Backtrace console
      • registerThread

         void registerThread(Thread thread, int timeout, int delay)

        Register a thread to monitor it

        Parameters:
        thread - thread which should be monitored
        timeout - time in milliseconds after which we consider the thread to be blocked
        delay - time delay in milliseconds after which the thread should be monitored
      • unRegisterThread

         void unRegisterThread(Thread thread)
        Parameters:
        thread - thread which should stop being monitored
      • tick

         void tick(Thread thread)

        Increase the counter associated with the thread

        Parameters:
        thread - thread whose counter should be increased
      • activateWatcher

         void activateWatcher(Thread thread)

        Activate the watcher associated with the thread to resume monitoring the thread

        Parameters:
        thread - thread whose counter should be activate
      • deactivateWatcher

         void deactivateWatcher(Thread thread)

        Deactivate the thread watcher associated with the thread to temporarily stop monitoring the thread

        Parameters:
        thread - thread whose watcher should be deactivate