Hi Team,
I am not quiet sure, put I have some strange feelings with the
changes to the Source interface.
The source interface is now split into Source and ModifiableSource.
This is a good idea, but I am not sure if it is practicable.
The original idea behind the refresh() method which builds now the
ModifiableSource interface, was to refresh and reset the Source object.
The reason for this is, that there might be Source objects were you
can only get an InputStream once. So if you want to read more
than once from a Source object you should call getInputStream(),
refresh() and then again getInputStream().
For example, the URLSource (http connection) needs this, as you
can get only once an inputstream from a connection and calling
refresh() creates a new connection object.
Now splitting this functionality into a subinterface makes the
handling of Source objects very difficult: you have first
to call getInputStream(), test if it is a ModifiableSource, if
so call refresh() and can then call getInputStream() again.
The SitemapSource (describing a cocoon: url) needs this refresh()
call, too.
So I would propose to add a new method to the Source interface
which will make several calls to getInputStream possible.
Any idea for a name (refresh and recycle are already used)?
Carsten
Open Source Group sunShine - b:Integrated
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de mailto: [EMAIL PROTECTED]
================================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]