summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/server/communication/FileUploadHandler.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/server/src/com/vaadin/server/communication/FileUploadHandler.java b/server/src/com/vaadin/server/communication/FileUploadHandler.java
index e9569d45a1..3f6bfd9267 100644
--- a/server/src/com/vaadin/server/communication/FileUploadHandler.java
+++ b/server/src/com/vaadin/server/communication/FileUploadHandler.java
@@ -38,6 +38,7 @@ import com.vaadin.server.VaadinResponse;
import com.vaadin.server.VaadinSession;
import com.vaadin.ui.Component;
import com.vaadin.ui.UI;
+import com.vaadin.ui.Upload.FailedEvent;
/**
* Handles a file upload request submitted via an Upload component.
@@ -197,7 +198,19 @@ public class FileUploadHandler implements RequestHandler {
}
}
- private static class UploadInterruptedException extends Exception {
+ /**
+ * An UploadInterruptedException will be thrown by an ongoing upload if
+ * {@link StreamVariable#isInterrupted()} returns <code>true</code>.
+ *
+ * By checking the exception of an {@link StreamingErrorEvent} or
+ * {@link FailedEvent} against this class, it is possible to determine if an
+ * upload was interrupted by code or aborted due to any other exception.
+ */
+ public static class UploadInterruptedException extends Exception {
+
+ /**
+ * Constructs an instance of <code>UploadInterruptedException</code>.
+ */
public UploadInterruptedException() {
super("Upload interrupted by other thread");
}