Interface TailerListener

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void fileNotFound()
      Called if the tailed file is not found.
      void fileRotated()
      Called if a file rotation is detected.
      void handle​(java.lang.Exception e)
      Called when an Exception is thrown.
      void handle​(java.lang.String line)
      Called when a line is read.
      void init​(Tailer tailer)
      Called during construction, giving the listener a method of stopping the tailer.
    • Method Detail

      • fileNotFound

        void fileNotFound()
        Called if the tailed file is not found.

        Note: this is called from the tailer thread.

      • fileRotated

        void fileRotated()
        Called if a file rotation is detected. This method is called before the file is reopened, and fileNotFound may be called if the new file has not yet been created.

        Note: Called from the tailer thread.

      • handle

        void handle​(java.lang.Exception e)
        Called when an Exception is thrown.

        Note: Called from the tailer thread.

        Parameters:
        e - the exception.
      • handle

        void handle​(java.lang.String line)
        Called when a line is read.

        Note: Called from the tailer thread.

        Parameters:
        line - the line.
      • init

        void init​(Tailer tailer)
        Called during construction, giving the listener a method of stopping the tailer.
        Parameters:
        tailer - the tailer.