eu.unicore.hila.gridftp
Class GridFTPStorage
java.lang.Object
eu.unicore.hila.common.BaseResource
eu.unicore.hila.common.grid.BaseStorage
eu.unicore.hila.gridftp.GridFTPStorage
- All Implemented Interfaces:
- eu.unicore.hila.grid.Storage, eu.unicore.hila.Resource
public class GridFTPStorage
- extends eu.unicore.hila.common.grid.BaseStorage
- implements eu.unicore.hila.grid.Storage
BEWARE: The user interface of FTPClient and GridFTPClient is not thread safe
[1].
[1] http://www.globus.org/cog/jftp/guide.html
- Author:
- bjoernh
06.02.2012 15:28:45
Fields inherited from class eu.unicore.hila.common.BaseResource |
location |
Method Summary |
List<eu.unicore.hila.Resource> |
getChildren()
FTP command LIST, unlike most other commands, transfers the data over the
data channel. |
static GridFTPStorage |
locate(eu.unicore.hila.Location _location,
Object... _extraInformation)
|
org.globus.ftp.GridFTPClient |
lockClient()
IMPORTANT: caller must ensure that corresponding unlockClient is called,
e.g. |
void |
unlockClient()
|
Methods inherited from class eu.unicore.hila.common.grid.BaseStorage |
asFile |
Methods inherited from class eu.unicore.hila.common.BaseResource |
findParentLocationOfType, getChild, getLocation, getMetadata, getName, getParent, ok |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface eu.unicore.hila.grid.Storage |
asFile |
Methods inherited from interface eu.unicore.hila.Resource |
getChild, getLocation, getMetadata, getName, getParent, ok |
locate
public static GridFTPStorage locate(eu.unicore.hila.Location _location,
Object... _extraInformation)
throws eu.unicore.hila.exceptions.HiLALocationSyntaxException,
eu.unicore.hila.exceptions.HiLAFactoryException
- Throws:
eu.unicore.hila.exceptions.HiLALocationSyntaxException
eu.unicore.hila.exceptions.HiLAFactoryException
lockClient
public org.globus.ftp.GridFTPClient lockClient()
throws eu.unicore.hila.exceptions.HiLAException
- IMPORTANT: caller must ensure that corresponding unlockClient is called,
e.g. with a finally { storage.unlockClient() } block
- Throws:
eu.unicore.hila.exceptions.HiLAException
unlockClient
public void unlockClient()
getChildren
public List<eu.unicore.hila.Resource> getChildren()
throws eu.unicore.hila.exceptions.HiLAException
- FTP command LIST, unlike most other commands, transfers the data over the
data channel. In that fashion it is very similar to file transfer
commands. FTPClient.list() requires the same sequence of actions as put()
or get(), including setting transfer and server modes if necessary [1].
Transfer type must be ASCII.
To obtain programmatic access to information of a single remote file, use
FTPClient.mlst() command. The resulting MlsxEntry object will contain all
the information returned by the server.
To obtain remote directory listing with similar properties, use
FTPClient.mlsd() command which will return a Vector of MlsxEntry objects,
each corresponding to one file in the directory.
- Specified by:
getChildren
in interface eu.unicore.hila.Resource
- Overrides:
getChildren
in class eu.unicore.hila.common.grid.BaseStorage
- Throws:
eu.unicore.hila.exceptions.HiLAException
- See Also:
BaseStorage.getChildren()
Copyright © 2010-2013 UNICORE. All Rights Reserved.