Interface Watchable


  • public interface Watchable
    A watchdog needs something to watch. If you wish to be watched, implement this interface.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      Returns a human-readable name of this Watchable.
      boolean isAlive()
      Returns true, if this Watchable is still alive and can be watched; otherwise false.
      void timeoutExceeded​(java.lang.String state)
      This is a callback which is called whenever your expected completion time is exceeded.
    • Method Detail

      • timeoutExceeded

        void timeoutExceeded​(java.lang.String state)
        This is a callback which is called whenever your expected completion time is exceeded. The current state of the stack is available.
        Parameters:
        state - The state in which your Watchable is currently.
      • getName

        java.lang.String getName()
        Returns a human-readable name of this Watchable. Used in logging.
        Returns:
        The name of the Watchable.
      • isAlive

        boolean isAlive()
        Returns true, if this Watchable is still alive and can be watched; otherwise false. For example, a stopped Thread is not very interesting to watch.
        Returns:
        the result