org.hd.d.pg2k.clApp.uploader
Class UploaderLogic.UploadStatus

java.lang.Object
  extended by org.hd.d.pg2k.clApp.uploader.UploaderLogic.UploadStatus
Enclosing class:
UploaderLogic

static final class UploaderLogic.UploadStatus
extends java.lang.Object

Details of one selected file being uploaded; immutable except for progress value.


Field Summary
(package private)  SelectedFileDetails file
          Selected file; never null.
private  java.util.concurrent.atomic.AtomicLong progress
          Current upload progress (bytes uploaded); never null.
 
Constructor Summary
UploaderLogic.UploadStatus(SelectedFileDetails selectedFile, java.util.concurrent.atomic.AtomicLong bytesUploaded)
          Create an instance.
 
Method Summary
(package private)  long getBytesUploaded()
          Get bytes of this exhibit uploaded so far.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

file

final SelectedFileDetails file
Selected file; never null.


progress

private final java.util.concurrent.atomic.AtomicLong progress
Current upload progress (bytes uploaded); never null. Private so that only get/read access is possible.

Constructor Detail

UploaderLogic.UploadStatus

UploaderLogic.UploadStatus(SelectedFileDetails selectedFile,
                           java.util.concurrent.atomic.AtomicLong bytesUploaded)
Create an instance. All args must be non-null and unique to this instance.

Method Detail

getBytesUploaded

long getBytesUploaded()
Get bytes of this exhibit uploaded so far. Thread-safe.

Returns:
-1 if upload of data not yet started, Long.MAX_VALUE once all data has been sent, else the number of bytes sent/uploaded

DHD Multimedia Gallery V1.57.21

Copyright (c) 1996-2011, Damon Hart-Davis. All rights reserved.