Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 28287 invoked from network); 30 Nov 2006 19:48:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Nov 2006 19:48:29 -0000 Received: (qmail 40702 invoked by uid 500); 30 Nov 2006 19:48:19 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 40666 invoked by uid 500); 30 Nov 2006 19:48:19 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 40645 invoked by uid 99); 30 Nov 2006 19:48:19 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Nov 2006 11:48:19 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [159.134.118.26] (HELO mail10.svc.cra.dublin.eircom.net) (159.134.118.26) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 30 Nov 2006 11:48:05 -0800 Received: (qmail 17005 messnum 6676591 invoked from network[81.179.76.78/81-179-76-78.dsl.pipex.com]); 30 Nov 2006 19:47:42 -0000 Received: from 81-179-76-78.dsl.pipex.com (HELO ?127.0.0.1?) (81.179.76.78) by mail10.svc.cra.dublin.eircom.net (qp 17005) with SMTP; 30 Nov 2006 19:47:42 -0000 Message-ID: <456F352B.9040105@eircom.net> Date: Thu, 30 Nov 2006 19:46:51 +0000 From: Rory Winston User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: Jakarta Commons Users List Subject: Re: [NET] FTP client object lifespan References: <3B6A54D3C6402045903B7563F5DA35C001406BD5@ADLEX02.elderslimited.com.au> In-Reply-To: <3B6A54D3C6402045903B7563F5DA35C001406BD5@ADLEX02.elderslimited.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Tony You'll need to provide this info on reconnect. Thanks Rory Tony Cooke wrote: > Hi Rory. > > Basically I'm talking about everything needed to connect to a server. > > - login/password information > - host / IP address of server > - passive / active connection information > - system type > - timezone, etc > - basically everything to do with setting up a connection to a server > > That way you can connect and disconnect from the server just by calling > connect() or disconnect() without having to set up the FTPClient every > time. > > The file monitor program I'm writing (with regards to FTP) requires that > I pass through an object and the filename to monitor, but this could be > multiple FTP locations with files for each location. > > With the FTPClient as it stands I would need to set up the connection > each time I connected because the disconnect would reset everything back > to defaults. > > I hope that explains it better. > > All the best, > Tony > > >> -----Original Message----- >> From: Rory Winston [mailto:rwinston@eircom.net] >> Sent: Thursday, 30 November 2006 9:18 AM >> To: Jakarta Commons Users List >> Subject: Re: [NET] FTP client object lifespan >> >> Tony >> >> Not really sure I understand the question - what configuration >> information are you talking about? >> >> Rory >> >> Tony Cooke wrote: >> >>> OK. This is probably a dumb question but I'll ask anyway. >>> >>> >>> >>> What is the lifespan of an FTPClient object? >>> >>> OR.... Do I need to recreate the configuration information each time >>> > I > >>> connect and disconnect? >>> >>> >>> >>> What I plan on doing is making an application that periodically >>> > monitors > >>> for any file changes on an ftp server. (VFS is supposed to do this >>> > but > >>> currently doesn't. I've had a bug logged for a while now but I got >>> > tired > >>> of waiting) >>> >>> >>> >>> What I want to do is set up the configuration information (system >>> > type, > >>> IP address / Host name, user ID, password, etc) for the FTPClient >>> > and > >>> use this with my monitor, connecting, checking the file for >>> > lastModified > >>> time and then disconnecting. This will be done every few hours or >>> > so. > >>> >>> I don't particularly want to have to set up the config information >>> > each > >>> time as I'm trying to make the monitor as generic as possible to >>> > monitor > >>> multiple ftp locations, with differing configurations. (Basically I >>> > want > >>> to call the monitor with an FTPClient objects and it will monitor a >>> > file > >>> specified for each object) >>> >>> >>> >>> I know that the disconnect resets the configuration to default but >>> > I'm > >>> wondering if there's any way to have an FTPClient object that >>> > retains it > >>> all so I just need to connect, check the files and disconnect. >>> >>> >>> >>> Thanks in advance for any help. >>> >>> >>> >>> All the best, >>> >>> Tony >>> >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org >> For additional commands, e-mail: commons-user-help@jakarta.apache.org >> >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org