Package sun.net

Class ProgressMonitor


  • public class ProgressMonitor
    extends Object
    ProgressMonitor is a class for monitoring progress in network input stream.
    • Constructor Detail

      • ProgressMonitor

        public ProgressMonitor()
    • Method Detail

      • getDefault

        public static ProgressMonitor getDefault()
        Return default ProgressMonitor.
      • setDefault

        public static void setDefault​(@Nullable
                                      ProgressMonitor m)
        Change default ProgressMonitor implementation.
      • getProgressSources

        public ArrayList<ProgressSource> getProgressSources()
        Return a snapshot of the ProgressSource list
      • getProgressUpdateThreshold

        public int getProgressUpdateThreshold()
        Return update notification threshold
      • shouldMeterInput

        public boolean shouldMeterInput​(URL url,
                                        String method)
        Return true if metering should be turned on for a particular URL input stream.
      • registerSource

        public void registerSource​(ProgressSource pi)
        Register progress source when progress is began.
      • unregisterSource

        public void unregisterSource​(ProgressSource pi)
        Unregister progress source when progress is finished.
      • updateProgress

        public void updateProgress​(ProgressSource pi)
        Progress source is updated.
      • addProgressListener

        public void addProgressListener​(ProgressListener l)
        Add progress listener in progress monitor.
      • removeProgressListener

        public void removeProgressListener​(ProgressListener l)
        Remove progress listener from progress monitor.