cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <>
Subject Re: Cocoon Bean Design
Date Tue, 17 Dec 2002 16:10:34 GMT
Upayavira wrote:

>I have been given some time at work during which I would like to implement a 
>CocoonBean (name and much of the below suggested by Vadim). I should have time 
>over the Christmas holiday. I would therefore like to try to pin down a spec for it before

>I would propose the following, as a code sample:
>CocoonBean cocoon = new CocoonBean("c:/working", "c:/context");
>/*** Set up Cocoon instance (optional) ***/

Is it "follow-links"? Then it's better be


>/*** Set up logging (optional) ***/
>/*** Process a single URI and pass results to an output stream ***/
>String URI = "cocoon:/blah/foobar.html?page=1";
>File f = new File("foobar.html");
>FileOutputStream fos = new FileOutputStream(f);
>cocoon.processURI(URI, fos);
>/*** Process a number of URIs, sending the results to a 'destination' ***/
>cocoon.setDestination(new FileDestination("c:/destination"));
>cocoon.setDestination(new FTPDestination("c:/localfolder", "", "bill", 
>"myPassword", "foo/bar/"));

There is another option - but I'm not sure that it is better. Just for 
you consideration:

cocoon.process(ArrayList targets, Destination destination);

This way cocoon bean could be made thread safe (if the rest of it is 

>Unless I hear from anyone, I'll just get on and do it like this.

Go ahead.

>Also, does anyone know of any decent java FTP client classes? 
> has couple of bugs and limited functionality, but 
it's Ok for many cases.


>Regards, Upayavira

To unsubscribe, e-mail:
For additional commands, email:

View raw message