public class FileUploader extends Object implements IObservable
Modifier and Type | Field and Description |
---|---|
static 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(String path,
int timeout,
ErrorContainer upload)
Upload files from error container to url
|
public static final String ZIP_EXTENSION
public FileUploader(org.apache.http.impl.client.CloseableHttpClient httpClient)
httpClient
- public void uploadFiles(String path, int timeout, ErrorContainer upload) throws HtmlMessengerException
url
- The URL to use.timeout
- - timeoutupload
- - error container with files in itHtmlMessengerException
public boolean addObserver(IObserver object)
IObservable
addObserver
in interface IObservable
object
- - observer objectpublic boolean deleteObserver(IObserver object)
IObservable
deleteObserver
in interface IObservable
object
- - observer to deletepublic void notifyObservers(ImportEvent event)
IObservable
notifyObservers
in interface IObservable
event
- - event that happened
Version: 5.1.4-ice35-b55
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.