Class ProgressionConsoleMonitor

  • All Implemented Interfaces:
    EventListener, ProgressionListener

    public class ProgressionConsoleMonitor
    extends Object
    implements ProgressionListener
    An object that permits to indicates the progression of a task. This monitor display on the console the progression of the task.
    Version:
    17.0 2020-01-04 14:41:38
    Author:
    Stéphane GALLAND
    Maven Group Id:
    org.arakhne.afc.core
    Maven Artifact Id:
    util
    • Constructor Detail

      • ProgressionConsoleMonitor

        public ProgressionConsoleMonitor()
        Construct a monitor.
    • Method Detail

      • getModel

        public Progression getModel()
        Replies the task progression model.
        Returns:
        the task progression model.
      • setModel

        public void setModel​(Progression model)
        Change the task progression model.
        Parameters:
        model - - the task progression model.
      • getLogger

        public Logger getLogger()
        Replies the logger used by this monitor.
        Returns:
        the logger, never null
      • setLogger

        public void setLogger​(Logger logger)
        Change the logger used by this monitor. If the given logger is null, then the default anonymous logger will be used.
        Parameters:
        logger - - the new logger.
      • buildMessage

        protected String buildMessage​(double progress,
                                      String comment,
                                      boolean isRoot,
                                      boolean isFinished,
                                      NumberFormat numberFormat)
        Build the logging message from the given data. This function is defined for enabling overriding in sub classes.
        Parameters:
        progress - - progression indicator between 0 and 1.
        comment - - associated comment.
        isRoot - - indicates if the progression model is a root model.
        isFinished - - indicates if the task is finished.
        numberFormat - - instance of the number formatter.
        Returns:
        the message.