]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - swt/rcp/org.argeo.swt.specific.rcp/src/org/eclipse/rap/fileupload/FileUploadListener.java
1 /*******************************************************************************
2 * Copyright (c) 2011, 2012 EclipseSource and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * EclipseSource - initial API and implementation
10 ******************************************************************************/
11 package org
.eclipse
.rap
.fileupload
;
13 import org
.eclipse
.swt
.widgets
.Display
;
17 * Listener to react on progress and completion of a file upload.
19 * <strong>Note:</strong> This listener will be called from a different thread than the UI thread.
20 * Implementations must use {@link Display#asyncExec(Runnable)} to access the UI.
23 * @see FileUploadEvent
25 public interface FileUploadListener
{
28 * Called when new information about an in-progress upload is available.
30 * @param event event object that contains information about the uploaded file
31 * @see FileUploadEvent#getBytesRead()
33 void uploadProgress( FileUploadEvent event
);
36 * Called when a file upload has finished successfully.
38 * @param event event object that contains information about the uploaded file
39 * @see FileUploadEvent
41 void uploadFinished( FileUploadEvent event
);
44 * Called when a file upload failed.
46 * @param event event object that contains information about the uploaded file
47 * @see FileUploadEvent#getErrorMessage()
49 void uploadFailed( FileUploadEvent event
);