001 package railo.runtime.net.ftp; 002 003 import java.io.IOException; 004 005 import org.apache.commons.net.ftp.FTPClient; 006 007 import railo.runtime.exp.PageException; 008 // FUTURE make this interface independent from org.apache so that the loader no longer need the apache.commons... jar 009 010 /** 011 * FTP Pool 012 */ 013 public interface FTPPool { 014 015 /** 016 * returns a FTPClient from the pool, if no matching exist, create a new one 017 * @param conn 018 * @return Matching FTP Client 019 * @throws IOException 020 * @throws PageException 021 */ 022 public abstract FTPClient get(FTPConnection conn) throws IOException, PageException; 023 024 /** 025 * removes a FTPConnection from pool andreturn it (disconnected) 026 * @param conn 027 * @return disconnetd Client 028 */ 029 public abstract FTPClient remove(FTPConnection conn); 030 031 /** 032 * removes a FTPConnection from pool andreturn it (disconnected) 033 * @param name Name of the connection to remove 034 * @return disconnetd Client 035 */ 036 public abstract FTPClient remove(String name); 037 038 /** 039 * clears all connection from pool 040 */ 041 public abstract void clear(); 042 043 }