|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.oodt.cas.pushpull.protocol.Protocol
org.apache.oodt.cas.pushpull.protocol.ftp.CommonsNetFtpClient
public class CommonsNetFtpClient
This class is responsible for FTP transfers. It is built as a wrapper around Apache's FTPClient class in order to connect it into the Crawler's Protocol infrastructure.
| Field Summary |
|---|
| Fields inherited from class org.apache.oodt.cas.pushpull.protocol.Protocol |
|---|
protocolType, remoteSite |
| Constructor Summary | |
|---|---|
CommonsNetFtpClient()
Creates a new FtpClient |
|
| Method Summary | |
|---|---|
void |
abortCurFileTransfer()
|
void |
cdToRoot()
|
protected void |
chDir(ProtocolPath path)
|
void |
connect(String host,
String username,
String password)
|
protected boolean |
deleteFile(ProtocolFile file)
|
void |
disconnectFromServer()
Disconnects the Protocol for the server |
ProtocolFile |
getCurrentWorkingDir()
Returns a string value of current directory -- similar to U*ix pwd() |
void |
getFile(ProtocolFile file,
File toLocalFile)
Downloads a file from Protocol server to the location specified by the java.io.File passed in. |
boolean |
isConnected()
Can be used to determine if Protocol is connected |
List<ProtocolFile> |
listFiles()
|
void |
sendNoOP()
|
| Methods inherited from class org.apache.oodt.cas.pushpull.protocol.Protocol |
|---|
cd, cdToHOME, cdToROOT, connect, delete, disconnect, download, download, equals, getAbsPathFor, getHomeDir, getProtocolFileFor, getProtocolType, getRemoteSite, isProtocolConnected, ls, ls, ls, pwd, reconnect |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CommonsNetFtpClient()
| Method Detail |
|---|
public void connect(String host,
String username,
String password)
throws ProtocolException
connect in class ProtocolProtocolException
public ProtocolFile getCurrentWorkingDir()
throws ProtocolException
getCurrentWorkingDir in class ProtocolProtocolException
public List<ProtocolFile> listFiles()
throws ProtocolException
listFiles in class ProtocolProtocolException
public void getFile(ProtocolFile file,
File toLocalFile)
throws ProtocolException
fileName,
can't be a path. User must first navigate to the directory which contains
the file and then can call this method.
getFile in class ProtocolProtocolException
public void abortCurFileTransfer()
throws ProtocolException
abortCurFileTransfer in class ProtocolProtocolException
protected void chDir(ProtocolPath path)
throws ProtocolException
chDir in class ProtocolProtocolException
public void cdToRoot()
throws ProtocolException
cdToRoot in class ProtocolProtocolException
public void sendNoOP()
throws ProtocolException
ProtocolException
public void disconnectFromServer()
throws ProtocolException
Protocol
disconnectFromServer in class ProtocolProtocolException
public boolean isConnected()
throws ProtocolException
Protocol
isConnected in class ProtocolProtocolExceptionprotected boolean deleteFile(ProtocolFile file)
deleteFile in class Protocol
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||