Package com.cbe

Class TransferDownloadEventProtocol


  • public class TransferDownloadEventProtocol
    extends java.lang.Object
    Protocol for implementing a transfer download delegate.
    Abstract base class which is used when you want notification on changes related to downloads. Note this class needs to be implemented by the user.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete()
      call delete on the delegate if you want garbage collector to clean up.
      void onChunkReceived​(Object object, long received, long total)
      Gets called when a chunk of data has successfully been recieved.
      void onObjectBinaryDownloaded​(Object object, byte[] data)
      Gets called when a download has completed.
      void onObjectDownloaded​(Object object, java.lang.String path)
      Gets called when a download has completed.
      void onObjectDownloadFailed​(Object object, long status)
      Gets called when a error has occured in the download stream
      • Methods inherited from class java.lang.Object

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

      • TransferDownloadEventProtocol

        public TransferDownloadEventProtocol()
    • Method Detail

      • delete

        public void delete()
        call delete on the delegate if you want garbage collector to clean up.
      • onChunkReceived

        public void onChunkReceived​(Object object,
                                    long received,
                                    long total)
        Gets called when a chunk of data has successfully been recieved.
      • onObjectDownloaded

        public void onObjectDownloaded​(Object object,
                                       java.lang.String path)
        Gets called when a download has completed.
      • onObjectBinaryDownloaded

        public void onObjectBinaryDownloaded​(Object object,
                                             byte[] data)
        Gets called when a download has completed. IMPORTANT!! This data is on the heap and you are responsible for calling delete on it. We may change data to a shared pointer in the future.
      • onObjectDownloadFailed

        public void onObjectDownloadFailed​(Object object,
                                           long status)
        Gets called when a error has occured in the download stream