public class FileUploader extends java.lang.Object implements IObservable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ZIP_EXTENSION
The extension used for the zip.
|
| Constructor and Description |
|---|
FileUploader(org.apache.http.impl.client.CloseableHttpClient httpClient)
Initialize upload with httpClient
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addObserver(IObserver object)
Add observer for notification
|
boolean |
deleteObserver(IObserver object)
Delete observer
|
void |
notifyObservers(ImportEvent event)
Notify observers of event
|
void |
uploadFiles(java.lang.String path,
int timeout,
ErrorContainer upload)
Upload files from error container to url
|
public static final java.lang.String ZIP_EXTENSION
public FileUploader(org.apache.http.impl.client.CloseableHttpClient httpClient)
httpClient - the HTTP client to usepublic void uploadFiles(java.lang.String path,
int timeout,
ErrorContainer upload)
throws HtmlMessengerException
path - the URL to which to POSTtimeout - the timeout (ignored)upload - the error container with files in itHtmlMessengerException - if the POST failedpublic boolean addObserver(IObserver object)
IObservableaddObserver in interface IObservableobject - - observer objectpublic boolean deleteObserver(IObserver object)
IObservabledeleteObserver in interface IObservableobject - - observer to deletepublic void notifyObservers(ImportEvent event)
IObservablenotifyObservers in interface IObservableevent - - event that happened
Version: 5.4.10-ice35-b105
Copyright © 2019 The University of Dundee & Open Microscopy Environment. All Rights Reserved.