|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.globus.cog.abstraction.impl.file.gridftp.old.FileResourceImpl
Implements FileResource API for accessing gridftp server Supports relative and absolute path names
| Field Summary |
| Fields inherited from interface org.globus.cog.abstraction.interfaces.FileResource |
FTP, GridFTP, Local, WebDAV |
| Fields inherited from interface org.globus.cog.abstraction.interfaces.GridResource |
EXECUTION, FILE, INFORMATION |
| Constructor Summary | |
FileResourceImpl()
throws InvalidProviderException |
|
FileResourceImpl(String name,
ServiceContact serviceContact,
SecurityContext securityContext)
constructor be used normally |
|
| Method Summary | |
void |
changeMode(GridFile newGridFile)
change permissions to a remote file |
void |
changeMode(String filename,
int mode)
Changes the permissions on the file if authorized to do so |
void |
createDirectory(String directory)
Equivalent to mkdir |
void |
deleteDirectory(String directory,
boolean force)
Remove directory and its files if force = true. |
void |
deleteFile(String file)
Equivalent to rm file command |
boolean |
exists(String filename)
Returns true if the file exists |
void |
get(String remoteFileName,
DataSink sink,
MarkerListener mListener)
get a remote file to the local stream |
void |
get(String remoteFileName,
File localFile)
get a remote file |
Enumeration |
getAllAttributes()
|
Object |
getAttribute(String name)
Get an attribute * |
String |
getCurrentDirectory()
Return Current Directory's name |
void |
getDirectory(String remoteDirName,
String localDirName)
Equivalent to the cp -r command |
void |
getFile(String remoteFileName,
String localFileName)
Equivalent to cp/copy command |
GridFile |
getGridFile(String fileName)
get remote file information |
protected GridFTPClient |
getGridFTPClient()
|
Identity |
getIdentity()
Return identity of the resource |
void |
getMultipleFiles(String[] remoteFileNames,
String localDirName)
mget - copy multiple files from remote server to local dir |
void |
getMultipleFiles(String[] remoteFileNames,
String[] localFileNames)
mget - copy multiple files from remote server |
String |
getName()
Return name of the resource |
String |
getProtocol()
return protocol ="gridftp" |
SecurityContext |
getSecurityContext()
Get the securityContext for the remote resource |
ServiceContact |
getServiceContact()
get service contact |
int |
getType()
Return type = FILE which is defined in GridResource |
boolean |
isDirectory(String dirName)
Is this filename a directory. |
boolean |
isStarted()
|
Collection |
list()
Equivalent to ls command in the current directory |
Collection |
list(String directory)
Equivalent to ls command on the given directory |
void |
put(DataSource source,
String remoteFileName,
MarkerListener mListener)
put the input from a stream into a remote resource. |
void |
put(File localFile,
String remoteFileName,
boolean append)
put a local file into remote resource |
void |
putDirectory(String localDirName,
String remoteDirName)
Equivalent to cp -r command |
void |
putFile(String localFileName,
String remoteFileName)
Copy a local file to a remote file. |
void |
putMultipleFiles(String[] localFileNames,
String remoteDirName)
mput - copy multiple files from local machines to remote directory |
void |
putMultipleFiles(String[] localFileNames,
String[] remoteFileNames)
mput - copy multiple files from local machine to remote destinations |
void |
rename(String remoteFileName1,
String remoteFileName2)
Rename a remote file. |
void |
setAttribute(String name,
Object value)
Set an attribute * |
void |
setCurrentDirectory(String directory)
Equivalent to cd command |
void |
setIdentity(Identity identity)
Set identity of the resource |
void |
setName(String name)
Set the name of the resource |
void |
setSecurityContext(SecurityContext securityContext)
Set the appropriate SecurityContext for the FileResource |
void |
setServiceContact(ServiceContact serviceContact)
set service contact |
void |
start()
Create the gridFTPClient and authenticate with the resource. |
void |
stop()
Stop the gridFTPClient from connecting to the server |
void |
submit(ExecutableObject commandWorkflow)
Not implemented in GridFTP * |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FileResourceImpl()
throws Exception
public FileResourceImpl(String name,
ServiceContact serviceContact,
SecurityContext securityContext)
| Method Detail |
public void setName(String name)
setName in interface GridResourcepublic String getName()
getName in interface GridResourcepublic void setIdentity(Identity identity)
setIdentity in interface GridResourcepublic Identity getIdentity()
getIdentity in interface GridResourcepublic int getType()
getType in interface GridResourcepublic String getProtocol()
getProtocol in interface FileResourcepublic void setServiceContact(ServiceContact serviceContact)
setServiceContact in interface FileResourcepublic ServiceContact getServiceContact()
getServiceContact in interface FileResourcepublic void setSecurityContext(SecurityContext securityContext)
setSecurityContext in interface FileResourcepublic SecurityContext getSecurityContext()
getSecurityContext in interface FileResource
public void start()
throws IllegalHostException,
InvalidSecurityContextException,
GeneralException
start in interface FileResourceIllegalHostException
InvalidSecurityContextException
GeneralException
public void stop()
throws GeneralException
stop in interface FileResourceGeneralExceptionpublic boolean isStarted()
isStarted in interface FileResource
public void setCurrentDirectory(String directory)
throws DirectoryNotFoundException,
GeneralException
setCurrentDirectory in interface FileResourceDirectoryNotFoundException
GeneralException
public String getCurrentDirectory()
throws GeneralException
getCurrentDirectory in interface FileResourceGeneralException
public Collection list()
throws GeneralException
list in interface FileResourceGeneralException
public Collection list(String directory)
throws DirectoryNotFoundException,
GeneralException
list in interface FileResourceDirectoryNotFoundException
GeneralException
public void createDirectory(String directory)
throws GeneralException
createDirectory in interface FileResourceGeneralException
public void deleteDirectory(String directory,
boolean force)
throws DirectoryNotFoundException,
GeneralException
deleteDirectory in interface FileResourceDirectoryNotFoundException
GeneralException
public void deleteFile(String file)
throws FileNotFoundException,
GeneralException
deleteFile in interface FileResourceFileNotFoundException
GeneralException
public void get(String remoteFileName,
DataSink sink,
MarkerListener mListener)
throws FileNotFoundException,
GeneralException
FileNotFoundException
GeneralException
public void get(String remoteFileName,
File localFile)
throws FileNotFoundException,
GeneralException
FileNotFoundException
GeneralException
public void getFile(String remoteFileName,
String localFileName)
throws FileNotFoundException,
GeneralException
getFile in interface FileResourceFileNotFoundException
GeneralException
public void putFile(String localFileName,
String remoteFileName)
throws FileNotFoundException,
GeneralException
putFile in interface FileResourceFileNotFoundException
GeneralException
public void put(File localFile,
String remoteFileName,
boolean append)
throws FileNotFoundException,
GeneralException
FileNotFoundException
GeneralException
public void put(DataSource source,
String remoteFileName,
MarkerListener mListener)
throws FileNotFoundException,
GeneralException
FileNotFoundException
GeneralException
public void getDirectory(String remoteDirName,
String localDirName)
throws DirectoryNotFoundException,
GeneralException
getDirectory in interface FileResourceDirectoryNotFoundException
GeneralException
public void putDirectory(String localDirName,
String remoteDirName)
throws DirectoryNotFoundException,
GeneralException
putDirectory in interface FileResourceDirectoryNotFoundException
GeneralException
public void getMultipleFiles(String[] remoteFileNames,
String[] localFileNames)
throws FileNotFoundException,
GeneralException
getMultipleFiles in interface FileResourceFileNotFoundException
GeneralException
public void getMultipleFiles(String[] remoteFileNames,
String localDirName)
throws FileNotFoundException,
DirectoryNotFoundException,
GeneralException
getMultipleFiles in interface FileResourceFileNotFoundException
DirectoryNotFoundException
GeneralException
public void putMultipleFiles(String[] localFileNames,
String[] remoteFileNames)
throws FileNotFoundException,
GeneralException
putMultipleFiles in interface FileResourceFileNotFoundException
GeneralException
public void putMultipleFiles(String[] localFileNames,
String remoteDirName)
throws FileNotFoundException,
DirectoryNotFoundException,
GeneralException
putMultipleFiles in interface FileResourceFileNotFoundException
DirectoryNotFoundException
GeneralException
public void rename(String remoteFileName1,
String remoteFileName2)
throws FileNotFoundException,
GeneralException
rename in interface FileResourceFileNotFoundException
GeneralException
public void changeMode(String filename,
int mode)
throws FileNotFoundException,
GeneralException
changeMode in interface FileResourceFileNotFoundException
GeneralException
public boolean exists(String filename)
throws FileNotFoundException,
GeneralException
exists in interface FileResourceFileNotFoundException
GeneralException
public boolean isDirectory(String dirName)
throws GeneralException
isDirectory in interface FileResourceGeneralException
public GridFile getGridFile(String fileName)
throws FileNotFoundException,
GeneralException
getGridFile in interface FileResourceFileNotFoundException
GeneralException
public void changeMode(GridFile newGridFile)
throws FileNotFoundException,
GeneralException
changeMode in interface FileResourceFileNotFoundException
GeneralException
public void submit(ExecutableObject commandWorkflow)
throws IllegalSpecException,
TaskSubmissionException
submit in interface FileResourceIllegalSpecException
TaskSubmissionException
public void setAttribute(String name,
Object value)
setAttribute in interface FileResourcepublic Enumeration getAllAttributes()
getAllAttributes in interface FileResourcepublic Object getAttribute(String name)
getAttribute in interface FileResourceprotected GridFTPClient getGridFTPClient()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||