Package jodd.http

Class HttpProgressListener


  • public abstract class HttpProgressListener
    extends java.lang.Object
    Http upload progress listener.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int size
      Total size to transfer.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      int callbackSize​(int size)
      Returns callback size in bytes.
      abstract void transferred​(int len)
      Callback for every sent chunk.
      • Methods inherited from class java.lang.Object

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

      • size

        protected int size
        Total size to transfer.
    • Constructor Detail

      • HttpProgressListener

        public HttpProgressListener()
    • Method Detail

      • callbackSize

        public int callbackSize​(int size)
        Returns callback size in bytes. By default it returns size of 1 percent of a total size. If returned size is less then 512, it will be rounded to 512. This is also the size of the chunk that is sent over network.
      • transferred

        public abstract void transferred​(int len)
        Callback for every sent chunk. Also called before and after the transfer.