You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Alban Peignier <al...@free.fr> on 2004/01/21 11:58:19 UTC

[io] [PROPOSAL] IO Operations

Hi,

For a long time, I wondered how to improve the support of the long
operations provided by the Utils classes (file copies, listing, deletion,
....).
The IO Operations are a proposal to the Commons IO project to provide a
API to   support long IO operations with several features (progress and
status monitoring, canceling, error handling, etc ...).
I began a draft implementation. The API Javadoc and sources are available.
 For more details, see this WikiPage
http://wiki.tryphon.org/JavaWiki/IOOperation.
I hope some people will find something useful in this design ;o)
-- 
Alban Peignier
http://www.tryphon.org/~alban



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [io] [PROPOSAL] IO Operations

Posted by Stephen Colebourne <sc...@btopenworld.com>.
I think that code like this would be a great addition to [io]. There has
been a pattern in a number of commons utilities where code starts as static
utilities and then becomes beans/classes underneath.

One thing to consider at this point is whether to match the names of the
Utils classes to the Operation classes. We have a CopyUtils, but maybe we
should have a DeleteUtils, and LoadUtils as well.


Actually, after thinking a little more, I wonder whether a new component for
operation/functor based programming might be applicable. It could cover io,
lang, convert, lots of things in a single API style. It could use [functor]
for its model and for chaining etc., and call onto Utils classes to do the
work. (I know there are some problems with this, partiularly with regards
event handling). Well, its an idea...

Stephen

From: "Alban Peignier" <al...@free.fr>
> > So, I'll give others a chance to chime in, but overall I think your
> > ideas are good ones.  Not as a replacement to the current static-based
> > API, but as additions.
>
> I think the static-based API must be keep available. It might use
> internally the IO Operation API to perform the wanted task.--
> Alban Peignier
> http://www.tryphon.org/~alban



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [io] [PROPOSAL] IO Operations

Posted by Alban Peignier <al...@free.fr>.
> So, I'll give others a chance to chime in, but overall I think your
> ideas are good ones.  Not as a replacement to the current static-based
> API, but as additions.

I think the static-based API must be keep available. It might use
internally the IO Operation API to perform the wanted task.-- 
Alban Peignier
http://www.tryphon.org/~alban



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [io] [PROPOSAL] IO Operations

Posted by __matthewHawthorne <ma...@phreaker.net>.
You've got some interesting ideas there.  However, I still believe that 
the majority of use-cases will involve quick calls to the static methods 
in XxxUtils classes, so it makes sense for that to remain the default 
implementation style.

The ability to use specialized execution types, cancellation, and status 
reporting appears useful, especially for large IO operations -- for 
example, an IDE would possibly want to use some of these features when 
copying a large file tree.

So, I'll give others a chance to chime in, but overall I think your 
ideas are good ones.  Not as a replacement to the current static-based 
API, but as additions.


Alban Peignier wrote:
> Hi,
> 
> For a long time, I wondered how to improve the support of the long
> operations provided by the Utils classes (file copies, listing, deletion,
> ....).
> The IO Operations are a proposal to the Commons IO project to provide a
> API to   support long IO operations with several features (progress and
> status monitoring, canceling, error handling, etc ...).
> I began a draft implementation. The API Javadoc and sources are available.
>  For more details, see this WikiPage
> http://wiki.tryphon.org/JavaWiki/IOOperation.
> I hope some people will find something useful in this design ;o)

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org