cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Upayavira">
Subject Environments and the CocoonBean
Date Fri, 03 Jan 2003 11:22:14 GMT

I have been trying more to get my head around the code I extracted from the class.

Firstly - environments:

The way the code works is that it creates an OutputStream outside of the 
FileSavingEnvironment, and hands this stream to this Environment. Cocoon then 
asks the FileSavingEnvironment for an OutputStream.

What I have done is implemented Destination classes, where this class provides an 
OutputStream customised for sending information by FTP, HTTP, etc.

However, it strikes me that this is the role of the Environment objects.

So, rather than have a Destination object hand its OutputStream to a 
FileSavingEnvironment, and that hand it to Cocoon, I would propose that I create an 
abstract BeanEnvironment class, and then subclass that as an FTPEnvironment, 
HTTPEnvironment (better name probably needed), FileSaveEnvironment, 
EmailEnvironment, etc, adding to these the behaviour that I originally had within my 
Destination classes.

Have I understood the role of the environment object correctly? I.e. it deals with a 
single request and the response to that request.

Regards, Upayavira

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

View raw message