|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.backsource.alert.agent.BaseCase
org.backsource.alert.agent.FtpAgent
FTP agent to check sanity of a dir on an ftp server.
The FtpAgent checks if it is possible to login to the given ftp server. It may also optionally check if there are to many files at the server, or if any of the files are to old. The following properties are possible to specify:
PropertyConstants.FTP_TIMEOUT,the socket timeout.PropertyConstants.FTP_HOST, the ftp hostPropertyConstants.FTP_USER, the user to login asPropertyConstants.FTP_PWD,the passwordPropertyConstants.FTP_DIR,an optional directory to check. if not specfifyed the check will be done in the cwd given byte login.
PropertyConstants.FTP_FILE_AGE, an optional age of the files int the checked directory, given in miliseconds.PropertyConstants.FTP_NO_FILES, an optial maximal number of files available in the checked directory.
| Field Summary |
| Fields inherited from class org.backsource.alert.agent.BaseCase |
agentName, prop |
| Constructor Summary | |
FtpAgent(java.lang.String name)
|
|
| Method Summary | |
protected org.apache.commons.net.ftp.FTPFile[] |
getFiles(org.apache.commons.net.ftp.FTPClient ftp)
Return a listing with only files, no dirs. |
static void |
main(java.lang.String[] args)
|
protected void |
setUp()
|
void |
testFtpFiles()
Test log in to the given ftp host. |
| Methods inherited from class org.backsource.alert.agent.BaseCase |
getAgentName, getProperties, initialize, toString |
| Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown |
| Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface junit.framework.Test |
countTestCases, run |
| Constructor Detail |
public FtpAgent(java.lang.String name)
| Method Detail |
protected void setUp()
throws java.lang.Exception
setUp in class BaseCasejava.lang.Exception
public void testFtpFiles()
throws java.lang.Exception
if no.files and/or fileage is set, these will also be checked.
java.lang.Exception
protected org.apache.commons.net.ftp.FTPFile[] getFiles(org.apache.commons.net.ftp.FTPClient ftp)
throws java.lang.Exception
java.lang.Exceptionpublic static void main(java.lang.String[] args)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||