Class DefaultStreamGobblerCallback

  • All Implemented Interfaces:
    StreamGobblerCallback

    public class DefaultStreamGobblerCallback
    extends java.lang.Object
    implements StreamGobblerCallback
    The default callback for the stream gobbler, that logs all the messages to a particular logging level. By default all the messages are logged onto the DEBUG level.
    Version:
    $Revision$
    Author:
    Karan Vahi
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int mLevel
      The level on which the messages are to be logged.
      private LogManager mLogger
      The instance to the logger to log messages.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void work​(java.lang.String line)
      Callback whenever a line is read from the stream by the StreamGobbler.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • mLevel

        private int mLevel
        The level on which the messages are to be logged.
      • mLogger

        private LogManager mLogger
        The instance to the logger to log messages.
    • Constructor Detail

      • DefaultStreamGobblerCallback

        public DefaultStreamGobblerCallback​(int level)
        The overloaded constructor.
        Parameters:
        level - the level on which to log.
    • Method Detail

      • work

        public void work​(java.lang.String line)
        Callback whenever a line is read from the stream by the StreamGobbler. The line is logged to the level specified while initializing the class.
        Specified by:
        work in interface StreamGobblerCallback
        Parameters:
        line - the line that is read.