ome.formats.importer.util
Class FileUploader

java.lang.Object
  extended by ome.formats.importer.util.FileUploader
All Implemented Interfaces:
IObservable

public class FileUploader
extends Object
implements IObservable

Author:
Brian W. Loranger

Constructor Summary
FileUploader(org.apache.commons.httpclient.HttpClient httpClient)
          Initialize upload with httpClient
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUploader

public FileUploader(org.apache.commons.httpclient.HttpClient httpClient)
Initialize upload with httpClient

Parameters:
httpClient -
Method Detail

setSessionId

public void setSessionId(String sessionId)
Set specific sessionID

Parameters:
sessionId -

getSessionId

public String getSessionId()
Returns:
session_id

uploadFiles

public void uploadFiles(String url,
                        int timeout,
                        ErrorContainer upload)
Upload files from error container to url

Parameters:
url - - url to send to
timeout - - timeout
upload - - error container with files in it

addObserver

public boolean addObserver(IObserver object)
Description copied from interface: IObservable
Add observer for notification

Specified by:
addObserver in interface IObservable
Parameters:
object - - observer object
Returns:
true if added

deleteObserver

public boolean deleteObserver(IObserver object)
Description copied from interface: IObservable
Delete observer

Specified by:
deleteObserver in interface IObservable
Parameters:
object - - observer to delete
Returns:
true if deleted

notifyObservers

public void notifyObservers(ImportEvent event)
Description copied from interface: IObservable
Notify observers of event

Specified by:
notifyObservers in interface IObservable
Parameters:
event - - event that happened

cancel

public void cancel()
cancel's upload


main

public static void main(String[] args)
Main for testing (debugging only)

Parameters:
args -
Throws:
Exception


OmeroJava Api

Version: 4.3.4-dbcbce5a-b4

Copyright © 2009 The University of Dundee. All Rights Reserved.