public class FileUploader extends Object implements IObservable
Constructor and Description |
---|
FileUploader(org.apache.commons.httpclient.HttpClient httpClient)
Initialize upload with httpClient
|
Modifier and Type | Method and Description |
---|---|
boolean |
addObserver(IObserver object)
Add observer for notification
|
void |
cancel()
cancel's upload
|
boolean |
deleteObserver(IObserver object)
Delete observer
|
String |
getSessionId() |
static void |
main(String[] args)
Main for testing (debugging only)
|
void |
notifyObservers(ImportEvent event)
Notify observers of event
|
void |
setSessionId(String sessionId)
Set specific sessionID
|
void |
uploadFiles(String url,
int timeout,
ErrorContainer upload)
Upload files from error container to url
|
public FileUploader(org.apache.commons.httpclient.HttpClient httpClient)
httpClient
- public void setSessionId(String sessionId)
sessionId
- public String getSessionId()
public void uploadFiles(String url, int timeout, ErrorContainer upload)
url
- - url to send totimeout
- - timeoutupload
- - error container with files in itpublic 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 happenedpublic void cancel()
Version: 4.4.12-ice34-b116
Copyright © 2014 The University of Dundee & Open Microscopy Environment. All Rights Reserved.