Class AntProgressListener

  • All Implemented Interfaces:
    ProgressListener

    public class AntProgressListener
    extends java.lang.Object
    implements ProgressListener
    Designed to show the progress for Ant tasks.
    • Constructor Detail

      • AntProgressListener

        public AntProgressListener​(org.apache.tools.ant.Task antTask)
        Output will be printed to the stdout.
      • AntProgressListener

        public AntProgressListener​(org.apache.tools.ant.Task antTask,
                                   boolean quiet)
        Parameters:
        quiet - If true, only error and warning messages will be printed.
    • Method Detail

      • notifyProgressEvent

        public void notifyProgressEvent​(Engine engine,
                                        int event,
                                        java.io.File src,
                                        int pMode,
                                        java.lang.Throwable error,
                                        java.lang.Object param)
        Description copied from interface: ProgressListener
        Method called be the engine to notify events.

        It is guaranteed that this method will not be called concurrently as far as the listener is added to a single Engine instance only.

        Specified by:
        notifyProgressEvent in interface ProgressListener
        Parameters:
        engine - The engine instance where the event has occurred.
        event - The code of the event: an EVENT_... constant. As new event types can be introduced with new FMPP versions (even if it happens very seldom), a progress listener implementation should survive events that it does not understand. That is, it must not stop with an error, but it should silently ignore the event.
        src - Depending on event the source file or null.
        pMode - Depending on event the proccessing mode (Engine.PMODE_... constant) or Engine.PMODE_NONE. Note that new processing modes may be added as FMPP evolvers, so values that are not known be the progress listener should be handler nicely, and never cause error.
        error - The error, or null if there was no error.
        param - Extra information about the event. The class and meaning of object depends on the concrete event:
        • For EVENT_WARNING it is a String that describles the reason of warning.
      • getErrorCount

        public int getErrorCount()