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:[EMAIL PROTECTED]
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to