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.
}
}
- 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");
}