Class HttpFetcher
- java.lang.Object
-
- ubic.gemma.core.loader.util.fetcher.AbstractFetcher
-
- ubic.gemma.core.loader.util.fetcher.HttpFetcher
-
- All Implemented Interfaces:
Fetcher
public class HttpFetcher extends AbstractFetcher
A generic class for fetching files via HTTP and writing them to a local file system.- Author:
- pavlidis
-
-
Field Summary
-
Fields inherited from class ubic.gemma.core.loader.util.fetcher.AbstractFetcher
allowUseExisting, force, INFO_UPDATE_INTERVAL, localBasePath, log, remoteBaseDir
-
-
Constructor Summary
Constructors Constructor Description HttpFetcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FutureTask<Boolean>
defineTask(String outputFileName, String seekFile)
protected Collection<LocalFile>
doTask(FutureTask<Boolean> future, String seekFile, String outputFileName)
Collection<LocalFile>
fetch(String url)
Fetch files according to the identifier provided.Collection<LocalFile>
fetch(String url, String outputFileName)
protected String
formLocalFilePath(String identifier, File newDir)
protected String
formRemoteFilePath(String identifier)
protected void
initConfig()
protected Collection<LocalFile>
listFiles(String seekFile, String outputFileName)
-
Methods inherited from class ubic.gemma.core.loader.util.fetcher.AbstractFetcher
fetchedFile, fetchedFile, getExistingFile, getLocalBasePath, isForce, mkdir, mkdir, setAllowUseExisting, setForce, waitForDownload, waitForDownload
-
-
-
-
Method Detail
-
fetch
public Collection<LocalFile> fetch(String url)
Description copied from interface:Fetcher
Fetch files according to the identifier provided.- Parameters:
url
- identifier- Returns:
- local files
-
fetch
public Collection<LocalFile> fetch(String url, String outputFileName)
-
defineTask
protected FutureTask<Boolean> defineTask(String outputFileName, String seekFile)
-
doTask
protected Collection<LocalFile> doTask(FutureTask<Boolean> future, String seekFile, String outputFileName)
-
formLocalFilePath
protected String formLocalFilePath(String identifier, File newDir)
- Specified by:
formLocalFilePath
in classAbstractFetcher
-
formRemoteFilePath
protected String formRemoteFilePath(String identifier)
- Specified by:
formRemoteFilePath
in classAbstractFetcher
-
initConfig
protected void initConfig()
- Specified by:
initConfig
in classAbstractFetcher
-
listFiles
protected Collection<LocalFile> listFiles(String seekFile, String outputFileName) throws IOException
- Throws:
IOException
-
-