Package ome.formats.importer.util
Class FileUploader
- java.lang.Object
- 
- ome.formats.importer.util.FileUploader
 
- 
- All Implemented Interfaces:
- IObservable
 
 public class FileUploader extends java.lang.Object implements IObservable 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringZIP_EXTENSIONThe extension used for the zip.
 - 
Constructor SummaryConstructors Constructor Description FileUploader(org.apache.http.impl.client.CloseableHttpClient httpClient)Initialize upload with httpClient
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddObserver(IObserver object)Add observer for notificationbooleandeleteObserver(IObserver object)Delete observervoidnotifyObservers(ImportEvent event)Notify observers of eventvoiduploadFiles(java.lang.String path, int timeout, ErrorContainer upload)Upload files from error container to url
 
- 
- 
- 
Field Detail- 
ZIP_EXTENSIONpublic static final java.lang.String ZIP_EXTENSION The extension used for the zip.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
uploadFilespublic void uploadFiles(java.lang.String path, int timeout, ErrorContainer upload) throws HtmlMessengerExceptionUpload files from error container to url- Parameters:
- path- the URL to which to POST
- timeout- the timeout (ignored)
- upload- the error container with files in it
- Throws:
- HtmlMessengerException- if the POST failed
 
 - 
addObserverpublic boolean addObserver(IObserver object) Description copied from interface:IObservableAdd observer for notification- Specified by:
- addObserverin interface- IObservable
- Parameters:
- object- - observer object
- Returns:
- true if added
 
 - 
deleteObserverpublic boolean deleteObserver(IObserver object) Description copied from interface:IObservableDelete observer- Specified by:
- deleteObserverin interface- IObservable
- Parameters:
- object- - observer to delete
- Returns:
- true if deleted
 
 - 
notifyObserverspublic void notifyObservers(ImportEvent event) Description copied from interface:IObservableNotify observers of event- Specified by:
- notifyObserversin interface- IObservable
- Parameters:
- event- - event that happened
 
 
- 
 
-