org.globus.cog.gridface.impl.directorybrowser
Class FileTransferObjectImpl

java.lang.Object
  extended byorg.globus.cog.gridface.impl.directorybrowser.FileTransferObjectImpl
All Implemented Interfaces:
ConnectionObject, FileTransferObject

public class FileTransferObjectImpl
extends Object
implements FileTransferObject


Constructor Summary
FileTransferObjectImpl(StatusListener statusListener, GridCommandManager gcm)
           
 
Method Summary
 GridCommand close()
          Call when browser window is closed.
 GridCommand connect(String protocol, String host, String port)
          Make a new connection *
 GridCommand disConnect()
          Close the connection.
 void execute(GridCommand command, boolean background)
           
 GridCommand exists(URI uri)
          Check if file or directory specified by the URI exists
 GridCommand getCurrentDirectory()
          Gets the directory we're currently working in.
 GridCommand getDir(URI uriRemote, URI uriLocal)
          Get a Dir.
 GridCommand getFile(URI uriRemote, URI uriLocal)
          Get a file.
 String getHost()
          Get Hostname of the underlying client
 String getPort()
          Get Port of the underlying client
 GridCommand getProperties(URI uri)
          Retrieve file properties
 String getProtocol()
          Set the protocol for the underlying connection
 void getProxy()
          Get Proxy for this connection
 String getSecurityContext()
          Get Port of the underlying client
 Identity getSessionId()
           
 GridCommand isDirectory(URI uri)
          Is the URI a directory?
 GridCommand ls()
          Returns an Collection of the current directory.
 GridCommand ls(URI uri)
          Returns and Collection of the directory specified by the URI.
 GridCommand makeDirectory(URI uri)
          Creates the directory specified by the URI
 GridCommand putDir(URI uriLocal, URI uriRemote)
          Put a Dir.
 GridCommand putFile(URI uriLocal, URI uriRemote)
          Put a file.
 GridCommand reConnect()
          reconnect the connection *
 GridCommand rmdir(URI uri)
          Remove directory pointed to URI from host
 GridCommand rmfile(URI uri)
          Remove file pointed by URI from host
 GridCommand setCurrentDirectory(URI uri)
          Set Current Directory
 void setHost(String host)
          Set the hostname for the underlying connection
 void setPassword(String password)
           
 void setPort(String port)
          Set port for the underlying connection
 GridCommand setProperties(URI uri)
          Set properties of the file pointed by URI
 void setProtocol(String protocol)
          Set the protocl for the underlyging connection
 void setProxy()
          Set proxy for this connection
 void setSecurityContext(String port)
          Set port for the underlying connection
 void setSessionId(Identity sessionId)
           
 void setUsername(String username)
           
 GridCommand size(URI uri)
          Get size of the file specified by URI
 GridCommand thirdPartyCopyFile(URI uriSource, URI uriDestination)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileTransferObjectImpl

public FileTransferObjectImpl(StatusListener statusListener,
                              GridCommandManager gcm)
Method Detail

execute

public void execute(GridCommand command,
                    boolean background)
             throws Exception
Specified by:
execute in interface FileTransferObject
Throws:
Exception

setSessionId

public void setSessionId(Identity sessionId)
Specified by:
setSessionId in interface FileTransferObject

getSessionId

public Identity getSessionId()
Specified by:
getSessionId in interface FileTransferObject

getProperties

public GridCommand getProperties(URI uri)
Description copied from interface: FileTransferObject
Retrieve file properties

Specified by:
getProperties in interface FileTransferObject

setProperties

public GridCommand setProperties(URI uri)
Description copied from interface: FileTransferObject
Set properties of the file pointed by URI

Specified by:
setProperties in interface FileTransferObject

thirdPartyCopyFile

public GridCommand thirdPartyCopyFile(URI uriSource,
                                      URI uriDestination)
Specified by:
thirdPartyCopyFile in interface FileTransferObject

getFile

public GridCommand getFile(URI uriRemote,
                           URI uriLocal)
Description copied from interface: FileTransferObject
Get a file. Called through paste *

Specified by:
getFile in interface FileTransferObject

putFile

public GridCommand putFile(URI uriLocal,
                           URI uriRemote)
Description copied from interface: FileTransferObject
Put a file. Called through copy *

Specified by:
putFile in interface FileTransferObject

getDir

public GridCommand getDir(URI uriRemote,
                          URI uriLocal)
Description copied from interface: FileTransferObject
Get a Dir. Called through paste

Specified by:
getDir in interface FileTransferObject

putDir

public GridCommand putDir(URI uriLocal,
                          URI uriRemote)
Description copied from interface: FileTransferObject
Put a Dir. Called through copy

Specified by:
putDir in interface FileTransferObject

rmfile

public GridCommand rmfile(URI uri)
Description copied from interface: FileTransferObject
Remove file pointed by URI from host

Specified by:
rmfile in interface FileTransferObject

rmdir

public GridCommand rmdir(URI uri)
Description copied from interface: FileTransferObject
Remove directory pointed to URI from host

Specified by:
rmdir in interface FileTransferObject

setCurrentDirectory

public GridCommand setCurrentDirectory(URI uri)
Description copied from interface: FileTransferObject
Set Current Directory

Specified by:
setCurrentDirectory in interface FileTransferObject

getCurrentDirectory

public GridCommand getCurrentDirectory()
Gets the directory we're currently working in.

Specified by:
getCurrentDirectory in interface FileTransferObject
Returns:
URI The URI of the current directory.

makeDirectory

public GridCommand makeDirectory(URI uri)
Creates the directory specified by the URI

Specified by:
makeDirectory in interface FileTransferObject
Parameters:
uri - The URI of the directory we want to create.

ls

public GridCommand ls()
Returns an Collection of the current directory.

Specified by:
ls in interface FileTransferObject
Returns:
Collection An Collection of type FileInfo

ls

public GridCommand ls(URI uri)
Returns and Collection of the directory specified by the URI.

Specified by:
ls in interface FileTransferObject
Parameters:
uri - The URI whose directory listing we want.
Returns:
Collection An Collection of type FileInfo

exists

public GridCommand exists(URI uri)
Description copied from interface: FileTransferObject
Check if file or directory specified by the URI exists

Specified by:
exists in interface FileTransferObject

size

public GridCommand size(URI uri)
Description copied from interface: FileTransferObject
Get size of the file specified by URI

Specified by:
size in interface FileTransferObject

isDirectory

public GridCommand isDirectory(URI uri)
Description copied from interface: FileTransferObject
Is the URI a directory?

Specified by:
isDirectory in interface FileTransferObject

getHost

public String getHost()
Description copied from interface: ConnectionObject
Get Hostname of the underlying client

Specified by:
getHost in interface ConnectionObject

setHost

public void setHost(String host)
Description copied from interface: ConnectionObject
Set the hostname for the underlying connection

Specified by:
setHost in interface ConnectionObject

getPort

public String getPort()
Description copied from interface: ConnectionObject
Get Port of the underlying client

Specified by:
getPort in interface ConnectionObject

setPort

public void setPort(String port)
Description copied from interface: ConnectionObject
Set port for the underlying connection

Specified by:
setPort in interface ConnectionObject

getProtocol

public String getProtocol()
Description copied from interface: ConnectionObject
Set the protocol for the underlying connection

Specified by:
getProtocol in interface ConnectionObject

setProtocol

public void setProtocol(String protocol)
Description copied from interface: ConnectionObject
Set the protocl for the underlyging connection

Specified by:
setProtocol in interface ConnectionObject

getSecurityContext

public String getSecurityContext()
Description copied from interface: ConnectionObject
Get Port of the underlying client

Specified by:
getSecurityContext in interface ConnectionObject

setSecurityContext

public void setSecurityContext(String port)
Description copied from interface: ConnectionObject
Set port for the underlying connection

Specified by:
setSecurityContext in interface ConnectionObject

connect

public GridCommand connect(String protocol,
                           String host,
                           String port)
                    throws Exception
Description copied from interface: ConnectionObject
Make a new connection *

Specified by:
connect in interface ConnectionObject
Throws:
Exception

disConnect

public GridCommand disConnect()
Description copied from interface: ConnectionObject
Close the connection. Disconnect

Specified by:
disConnect in interface ConnectionObject

reConnect

public GridCommand reConnect()
                      throws Exception
Description copied from interface: ConnectionObject
reconnect the connection *

Specified by:
reConnect in interface ConnectionObject
Throws:
Exception

close

public GridCommand close()
Description copied from interface: ConnectionObject
Call when browser window is closed. Same as disconnect

Specified by:
close in interface ConnectionObject

getProxy

public void getProxy()
Description copied from interface: ConnectionObject
Get Proxy for this connection

Specified by:
getProxy in interface ConnectionObject

setProxy

public void setProxy()
Description copied from interface: ConnectionObject
Set proxy for this connection

Specified by:
setProxy in interface ConnectionObject

setUsername

public void setUsername(String username)
Specified by:
setUsername in interface FileTransferObject

setPassword

public void setPassword(String password)
Specified by:
setPassword in interface FileTransferObject