public class FileUploadHandler
extends java.lang.Object
getUploadUrl()
.
Upload listeners can be attached to react on progress. When the upload has finished, a
FileUploadHandler has to be disposed of by calling its dispose()
method.Constructor and Description |
---|
FileUploadHandler(FileUploadReceiver receiver)
Constructs a file upload handler that is associated with the given receiver.
|
Modifier and Type | Method and Description |
---|---|
void |
addUploadListener(FileUploadListener listener)
Adds a the given file upload listener to the collection of listeners who will be notified when
a file upload proceeds.
|
void |
dispose()
Closes and de-registers the upload handler.
|
long |
getMaxFileSize()
Returns the maximum file size in bytes allowed to be uploaded for this handler.
|
FileUploadReceiver |
getReceiver()
Returns the file upload receiver that is associated with this file upload handler.
|
long |
getUploadTimeLimit()
Returns the maximum upload duration.
|
java.lang.String |
getUploadUrl()
Returns the upload URL to which a file can be uploaded.
|
void |
removeUploadListener(FileUploadListener listener)
Removes the given file upload listener from the collection of listeners who will be notified
when a file upload proceeds.
|
void |
setMaxFileSize(long maxFileSize)
Sets the maximum file size in bytes allowed to be uploaded for this handler.
|
void |
setUploadTimeLimit(long timeLimit)
Sets the maximum upload duration in milliseconds.
|
public FileUploadHandler(FileUploadReceiver receiver)
receiver
- the receiver that should process the uploaded data, must not be
null
public java.lang.String getUploadUrl()
public FileUploadReceiver getReceiver()
public void addUploadListener(FileUploadListener listener)
listener
- the file upload listener to add, must not be null
removeUploadListener(org.eclipse.rap.fileupload.FileUploadListener)
public void removeUploadListener(FileUploadListener listener)
listener
- the file upload listener to remove, must not be null
addUploadListener(org.eclipse.rap.fileupload.FileUploadListener)
public void dispose()
public long getMaxFileSize()
setMaxFileSize(long)
public void setMaxFileSize(long maxFileSize)
getMaxFileSize()
public long getUploadTimeLimit()
public void setUploadTimeLimit(long timeLimit)
getUploadTimeLimit()
Copyright (c) EclipseSource and others 2002, 2017.
All rights reserved. This program and the accompanying materials
are made available under the terms of the
Eclipse Public License v1.0