com.smartwerkz.jupload.classic.js
Class JSUploadProgressListener

java.lang.Object
  extended by com.smartwerkz.jupload.classic.js.JSListener
      extended by com.smartwerkz.jupload.classic.js.JSUploadProgressListener
All Implemented Interfaces:
UploadProgressListener

public class JSUploadProgressListener
extends JSListener
implements UploadProgressListener

Since:
29-Apr-2006, 12:29:25 AM
Author:
Dominik Seifert

Field Summary
 
Fields inherited from class com.smartwerkz.jupload.classic.js.JSListener
js
 
Constructor Summary
JSUploadProgressListener(JSWrapper js, java.lang.String name)
           
 
Method Summary
 void closed(UploadClient uploadClient, boolean succeeded)
          Is always called when the uploadClient is completely done and closed all its resources, independent on if it was cancelled, failed or succeeded.
 void dequeued(UploadClient uploadClient, UploadFile file)
          Is called when the given file has been dequeued for upload.
 void failed(UploadClient uploadClient, UploadEntity currentEntity, java.lang.Exception reason)
          Is called when an upload failed.
 void initialized(UploadClient uploadClient)
          Is called when the given uploadClient started and finished initializing (as soon as the UploadQueue has been created).
 void initializing(UploadClient uploadClient)
          Is called when the given UploadClient starts a new upload.
 void uploaded(UploadClient uploadClient, Thumbnail thumb)
          Is called after the last chunk of data to be uploaded has been read.
 void uploaded(UploadClient uploadClient, UploadFile file)
          Is called after the last chunk of data to be uploaded has been read.
 void uploading(UploadClient uploadClient, Thumbnail thumb)
          Is called when the upload of the given file begins.
 void uploading(UploadClient uploadClient, Thumbnail thumb, int bytes)
          Is called whenever a new chunk of data of the given size has been read to be uploaded.
 void uploading(UploadClient uploadClient, UploadFile file)
          Is called when the upload of the given file begins.
 void uploading(UploadClient uploadClient, UploadFile file, int bytes)
          Is called whenever a new chunk of data of the given size has been read to be uploaded.
 
Methods inherited from class com.smartwerkz.jupload.classic.js.JSListener
call, call, call, call, call, getJSClassName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSUploadProgressListener

public JSUploadProgressListener(JSWrapper js,
                                java.lang.String name)
Method Detail

initializing

public void initializing(UploadClient uploadClient)
Description copied from interface: UploadProgressListener
Is called when the given UploadClient starts a new upload. After initializing, the UploadQueue will be created which might block in case that the UploadTree did not finishe preparing and adding all current files.

Specified by:
initializing in interface UploadProgressListener

initialized

public void initialized(UploadClient uploadClient)
Description copied from interface: UploadProgressListener
Is called when the given uploadClient started and finished initializing (as soon as the UploadQueue has been created).

Specified by:
initialized in interface UploadProgressListener

failed

public void failed(UploadClient uploadClient,
                   UploadEntity currentEntity,
                   java.lang.Exception reason)
Description copied from interface: UploadProgressListener
Is called when an upload failed.

Specified by:
failed in interface UploadProgressListener
currentEntity - The file or thumbnails that is currently being uploaded or null.

dequeued

public void dequeued(UploadClient uploadClient,
                     UploadFile file)
Description copied from interface: UploadProgressListener
Is called when the given file has been dequeued for upload. This is important because some upload methods (eg http post) might dequeue multiple files before uploading them all together.

Specified by:
dequeued in interface UploadProgressListener

uploading

public void uploading(UploadClient uploadClient,
                      UploadFile file)
Description copied from interface: UploadProgressListener
Is called when the upload of the given file begins.

Specified by:
uploading in interface UploadProgressListener

uploading

public void uploading(UploadClient uploadClient,
                      UploadFile file,
                      int bytes)
Description copied from interface: UploadProgressListener
Is called whenever a new chunk of data of the given size has been read to be uploaded.

Specified by:
uploading in interface UploadProgressListener
file - the entity which is currently being uploaded
bytes - the delta (incremental, relative) amount of bytes which have been sent

uploaded

public void uploaded(UploadClient uploadClient,
                     UploadFile file)
Description copied from interface: UploadProgressListener
Is called after the last chunk of data to be uploaded has been read.

Specified by:
uploaded in interface UploadProgressListener

uploading

public void uploading(UploadClient uploadClient,
                      Thumbnail thumb)
Description copied from interface: UploadProgressListener
Is called when the upload of the given file begins.

Specified by:
uploading in interface UploadProgressListener

uploading

public void uploading(UploadClient uploadClient,
                      Thumbnail thumb,
                      int bytes)
Description copied from interface: UploadProgressListener
Is called whenever a new chunk of data of the given size has been read to be uploaded.

Specified by:
uploading in interface UploadProgressListener

uploaded

public void uploaded(UploadClient uploadClient,
                     Thumbnail thumb)
Description copied from interface: UploadProgressListener
Is called after the last chunk of data to be uploaded has been read.

Specified by:
uploaded in interface UploadProgressListener

closed

public void closed(UploadClient uploadClient,
                   boolean succeeded)
Description copied from interface: UploadProgressListener
Is always called when the uploadClient is completely done and closed all its resources, independent on if it was cancelled, failed or succeeded. As a rule, any call of UploadProgressListener.initializing(com.smartwerkz.jupload.classic.net.UploadClient) is followed by a call of UploadProgressListener.closed(com.smartwerkz.jupload.classic.net.UploadClient, boolean). If it succeeded or failed, #succeeded and UploadProgressListener.failed(com.smartwerkz.jupload.classic.net.UploadClient, com.smartwerkz.jupload.classic.files.UploadEntity, java.lang.Exception) will be called before respectively.

Specified by:
closed in interface UploadProgressListener


Copyright © 2007 smartwerkz.com. All Rights Reserved.