|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.globus.ftp.FTPClient
cgl.narada.gridapps.nbgridftp.gridftpext.NBGridFTPClient
public class NBGridFTPClient
| Field Summary | |
|---|---|
protected org.globus.ftp.extended.GridFTPServerFacade |
gLocalServer
|
protected org.globus.ftp.GridFTPSession |
gSession
|
| Fields inherited from class org.globus.ftp.FTPClient |
|---|
controlChannel, dateFormat, localServer, session |
| Constructor Summary | |
|---|---|
NBGridFTPClient(String host,
int port)
Constructs client and connects it to the remote server. |
|
| Method Summary | |
|---|---|
protected org.globus.ftp.vanilla.TransferState |
actualPut(String remoteFileName,
org.globus.ftp.DataSource source,
org.globus.ftp.MarkerListener mListener,
boolean append)
|
void |
authenticate(GSSCredential credential)
Performs authentication with specified user credentials. |
protected void |
checkNBGridFTPSupport()
assure that the server supports extended transfer features; throw exception if not |
void |
close()
Closes connection. |
void |
extendedGet(String remoteFileName,
long size,
org.globus.ftp.DataSink sink,
org.globus.ftp.MarkerListener mListener)
Retrieves file from remote server using extended block mode. |
void |
extendedPut(String remoteFileName,
org.globus.ftp.DataSource source,
org.globus.ftp.MarkerListener mListener)
Stores file at remote server using extended block mode. |
void |
extendedTransfer(String remoteSrcFile,
NBGridFTPClient destination,
String remoteDstFile,
org.globus.ftp.MarkerListener mListener)
Performs a third-party transfer between two servers using extended block mode. |
void |
get(String remoteFileName,
org.globus.ftp.DataSink sink,
org.globus.ftp.MarkerListener mListener)
Behaves almost like FTPClient.get(). |
void |
get(String remoteFileName,
File localFile)
|
org.globus.gsi.gssapi.auth.Authorization |
getAuthorization()
Returns authorization method for the control channel. |
org.globus.ftp.DataChannelAuthentication |
getDataChannelAuthentication()
Returns data channel authentication mode (DCAU). |
int |
getDataChannelProtection()
Returns data channel protection level. |
Vector |
list()
Performs remote directory listing, like FTPClient.list(). |
void |
list(String filter,
String modifier,
org.globus.ftp.DataSink sink)
Use this method to list remote directory while in parallel transfer mode. |
protected void |
listCheck()
|
void |
put(File localFile,
String remoteFileName,
boolean append)
|
void |
put(String remoteFileName,
org.globus.ftp.DataSource source,
org.globus.ftp.MarkerListener mListener)
Behaves almost like FTPClient.put(). |
void |
setActive()
Sets remote server active, telling it to connect to the client. |
void |
setActive(org.globus.ftp.HostPort hostPort)
Sets remote server active, telling it to connect to the given address. |
void |
setAuthorization(org.globus.gsi.gssapi.auth.Authorization authorization)
Sets authorization method for the control channel. |
void |
setDataChannelAuthentication(org.globus.ftp.DataChannelAuthentication type)
Sets data channel authentication mode (DCAU) |
void |
setDataChannelProtection(int protection)
Sets data channel protection level (PROT). |
void |
setLocalNoDataChannelAuthentication()
Sets compatibility mode with old GSIFTP server. |
void |
setLocalStripedActive()
Starts local server in striped active mode. |
org.globus.ftp.HostPortList |
setLocalStripedPassive()
Behaves like setLocalStripedPassive(FTPServerFacade.ANY_PORT, FTPServerFacade.DEFAULT_QUEUE) |
org.globus.ftp.HostPortList |
setLocalStripedPassive(int port,
int queue)
Starts local server in striped passive mode. |
void |
setLocalTCPBufferSize(int size)
Sets local TCP buffer size (for both receiving and sending). |
void |
setMode(int mode)
Sets transfer mode. |
void |
setStripedActive(org.globus.ftp.HostPortList hpl)
Sets remote server to striped active server mode (SPOR). |
org.globus.ftp.HostPortList |
setStripedPassive()
Sets remote server to striped passive server mode (SPAS). |
void |
setTCPBufferSize(int size)
Sets remote server TCP buffer size, in the following way: First see if server supports "SBUF" and if so, use it. |
| Methods inherited from class org.globus.ftp.FTPClient |
|---|
abort, actualGet, actualList, actualSetMode, asynchGet, asynchPut, authorize, changeDir, checkTransferParams, deleteDir, deleteFile, exists, getCurrentDir, getFeatureList, getLastModified, getSize, goUpDir, isActiveMode, isFeatureSupported, isPassiveMode, lastModified, list, makeDir, put, rename, setClientWaitParams, setLocalActive, setLocalPassive, setLocalPassive, setOptions, setPassive, setPassiveMode, setProtectionBufferSize, setRestartMarker, setType, size, transfer, transferBegin, transferRun, transferStart, transferWait |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.globus.ftp.GridFTPSession gSession
protected org.globus.ftp.extended.GridFTPServerFacade gLocalServer
| Constructor Detail |
|---|
public NBGridFTPClient(String host,
int port)
throws IOException,
org.globus.ftp.exception.ServerException
host - remote server hostport - remote server port
IOException
org.globus.ftp.exception.ServerException| Method Detail |
|---|
public void authenticate(GSSCredential credential)
throws IOException,
org.globus.ftp.exception.ServerException
credential - user credentials to use.
IOException - on i/o error
org.globus.ftp.exception.ServerException - on server refusal or faulty server behavior
public Vector list()
throws org.globus.ftp.exception.ServerException,
org.globus.ftp.exception.ClientException,
IOException
list in class org.globus.ftp.FTPClientorg.globus.ftp.exception.ServerException
org.globus.ftp.exception.ClientException
IOException
public void list(String filter,
String modifier,
org.globus.ftp.DataSink sink)
throws org.globus.ftp.exception.ServerException,
org.globus.ftp.exception.ClientException,
IOException
list in class org.globus.ftp.FTPClientorg.globus.ftp.exception.ServerException
org.globus.ftp.exception.ClientException
IOException
protected void listCheck()
throws org.globus.ftp.exception.ClientException
listCheck in class org.globus.ftp.FTPClientorg.globus.ftp.exception.ClientException
public void setMode(int mode)
throws IOException,
org.globus.ftp.exception.ServerException
setMode in class org.globus.ftp.FTPClientmode - should be Session.MODE_STREAM, MODE_EBLOCK, or MODE_BLOCK
IOException
org.globus.ftp.exception.ServerException
public void setTCPBufferSize(int size)
throws IOException,
org.globus.ftp.exception.ServerException
IOException
org.globus.ftp.exception.ServerExceptionpublic void setLocalTCPBufferSize(int size)
public org.globus.ftp.HostPortList setStripedPassive()
throws IOException,
org.globus.ftp.exception.ServerException
IOException
org.globus.ftp.exception.ServerException
public void setStripedActive(org.globus.ftp.HostPortList hpl)
throws IOException,
org.globus.ftp.exception.ServerException
IOException
org.globus.ftp.exception.ServerException
public org.globus.ftp.HostPortList setLocalStripedPassive(int port,
int queue)
throws IOException
port - required server port; can be set to FTPServerFacade.ANY_PORTqueue - max size of queue of awaiting new data channel connection
requests
IOException
public org.globus.ftp.HostPortList setLocalStripedPassive()
throws IOException
IOException
public void setLocalStripedActive()
throws org.globus.ftp.exception.ClientException,
IOException
org.globus.ftp.exception.ClientException
IOException
public void get(String remoteFileName,
org.globus.ftp.DataSink sink,
org.globus.ftp.MarkerListener mListener)
throws IOException,
org.globus.ftp.exception.ClientException,
org.globus.ftp.exception.ServerException
get in class org.globus.ftp.FTPClientIOException
org.globus.ftp.exception.ClientException
org.globus.ftp.exception.ServerException
public void extendedGet(String remoteFileName,
long size,
org.globus.ftp.DataSink sink,
org.globus.ftp.MarkerListener mListener)
throws IOException,
org.globus.ftp.exception.ClientException,
org.globus.ftp.exception.ServerException
remoteFileName - file to retrievesize - number of bytes of remote file to transmitsink - data sink to store the filemListener - marker listener
IOException
org.globus.ftp.exception.ClientException
org.globus.ftp.exception.ServerException
public void put(String remoteFileName,
org.globus.ftp.DataSource source,
org.globus.ftp.MarkerListener mListener)
throws IOException,
org.globus.ftp.exception.ServerException,
org.globus.ftp.exception.ClientException
put in class org.globus.ftp.FTPClientIOException
org.globus.ftp.exception.ServerException
org.globus.ftp.exception.ClientException
public void extendedPut(String remoteFileName,
org.globus.ftp.DataSource source,
org.globus.ftp.MarkerListener mListener)
throws IOException,
org.globus.ftp.exception.ServerException,
org.globus.ftp.exception.ClientException
remoteFileName - file name to storesource - source for the data to transfermListener - marker listener
IOException
org.globus.ftp.exception.ServerException
org.globus.ftp.exception.ClientException
public void extendedTransfer(String remoteSrcFile,
NBGridFTPClient destination,
String remoteDstFile,
org.globus.ftp.MarkerListener mListener)
throws IOException,
org.globus.ftp.exception.ServerException,
org.globus.ftp.exception.ClientException
remoteSrcFile - source filenamedestination - destination serverremoteDstFile - destination filenamemListener - transer progress listener.
Can be set to null.
IOException
org.globus.ftp.exception.ServerException
org.globus.ftp.exception.ClientException
protected void checkNBGridFTPSupport()
throws IOException,
org.globus.ftp.exception.ServerException
IOException
org.globus.ftp.exception.ServerException
public void setDataChannelAuthentication(org.globus.ftp.DataChannelAuthentication type)
throws IOException,
org.globus.ftp.exception.ServerException
type - for 2-party transfer must be
DataChannelAuthentication.SELF or DataChannelAuthentication.NONE
IOException
org.globus.ftp.exception.ServerExceptionpublic void setLocalNoDataChannelAuthentication()
public org.globus.ftp.DataChannelAuthentication getDataChannelAuthentication()
public void setDataChannelProtection(int protection)
throws IOException,
org.globus.ftp.exception.ServerException
IOException
org.globus.ftp.exception.ServerExceptionpublic int getDataChannelProtection()
public void setAuthorization(org.globus.gsi.gssapi.auth.Authorization authorization)
authorization - authorization method.public org.globus.gsi.gssapi.auth.Authorization getAuthorization()
public void get(String remoteFileName,
File localFile)
throws IOException,
org.globus.ftp.exception.ClientException,
org.globus.ftp.exception.ServerException
get in class org.globus.ftp.FTPClientIOException
org.globus.ftp.exception.ClientException
org.globus.ftp.exception.ServerException
public void put(File localFile,
String remoteFileName,
boolean append)
throws IOException,
org.globus.ftp.exception.ServerException,
org.globus.ftp.exception.ClientException
put in class org.globus.ftp.FTPClientIOException
org.globus.ftp.exception.ServerException
org.globus.ftp.exception.ClientException
protected org.globus.ftp.vanilla.TransferState actualPut(String remoteFileName,
org.globus.ftp.DataSource source,
org.globus.ftp.MarkerListener mListener,
boolean append)
throws IOException,
org.globus.ftp.exception.ServerException,
org.globus.ftp.exception.ClientException
actualPut in class org.globus.ftp.FTPClientIOException
org.globus.ftp.exception.ServerException
org.globus.ftp.exception.ClientException
public void setActive(org.globus.ftp.HostPort hostPort)
throws IOException,
org.globus.ftp.exception.ServerException
setActive in class org.globus.ftp.FTPClienthostPort - the address to which the server should connect
IOException
org.globus.ftp.exception.ServerException
public void setActive()
throws IOException,
org.globus.ftp.exception.ServerException,
org.globus.ftp.exception.ClientException
setActive in class org.globus.ftp.FTPClientIOException
org.globus.ftp.exception.ServerException
org.globus.ftp.exception.ClientException
public void close()
throws IOException,
org.globus.ftp.exception.ServerException
close in class org.globus.ftp.FTPClientIOException
org.globus.ftp.exception.ServerException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||