org.backsource.alert.agent
Class FtpAgent

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.backsource.alert.agent.BaseCase
              extended byorg.backsource.alert.agent.FtpAgent
All Implemented Interfaces:
Agent, junit.framework.Test

public class FtpAgent
extends BaseCase

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:

Version:
$Revision: 1.1.1.1 $
Author:
Peter Antman

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

FtpAgent

public FtpAgent(java.lang.String name)
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class BaseCase
Throws:
java.lang.Exception

testFtpFiles

public void testFtpFiles()
                  throws java.lang.Exception
Test log in to the given ftp host.

if no.files and/or fileage is set, these will also be checked.

Throws:
java.lang.Exception

getFiles

protected org.apache.commons.net.ftp.FTPFile[] getFiles(org.apache.commons.net.ftp.FTPClient ftp)
                                                 throws java.lang.Exception
Return a listing with only files, no dirs.

Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)


Copyright © 2002-2004 Backsource. All Rights Reserved.