cziegeler    01/03/12 22:50:07

  Modified:    src/org/apache/cocoon/reading Tag: xml-cocoon2
                        AbstractReader.java
  Log:
  Recycling readers
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.12  +15 -3     
xml-cocoon/src/org/apache/cocoon/reading/Attic/AbstractReader.java
  
  Index: AbstractReader.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon/src/org/apache/cocoon/reading/Attic/AbstractReader.java,v
  retrieving revision 1.1.2.11
  retrieving revision 1.1.2.12
  diff -u -r1.1.2.11 -r1.1.2.12
  --- AbstractReader.java       2001/03/12 05:55:23     1.1.2.11
  +++ AbstractReader.java       2001/03/13 06:50:06     1.1.2.12
  @@ -16,13 +16,14 @@
   import org.apache.avalon.Parameters;
   import org.apache.avalon.AbstractLoggable;
   import org.apache.avalon.Poolable;
  +import org.apache.avalon.Recyclable;
   
   /**
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
  - * @version CVS $Revision: 1.1.2.11 $ $Date: 2001/03/12 05:55:23 $
  + * @version CVS $Revision: 1.1.2.12 $ $Date: 2001/03/13 06:50:06 $
    */
  -public abstract class AbstractReader extends AbstractLoggable implements 
Poolable, Reader {
  +public abstract class AbstractReader extends AbstractLoggable implements 
Poolable, Reader, Recyclable {
       /** The current <code>EntityResolver</code>. */
       protected EntityResolver resolver=null;
       /** The current <code>Map</code> of the object model. */
  @@ -49,7 +50,7 @@
        * Set the <code>OutputStream</code>
        */
       public void setOutputStream(OutputStream out) {
  -        this.out = new BufferedOutputStream(out);
  +          this.out = new BufferedOutputStream(out);
       }
   
       /**
  @@ -59,5 +60,16 @@
        */
       public String getMimeType() {
           return null;
  +    }
  +
  +    /**
  +     * Recycle the component
  +     */
  +    public void recycle() {
  +        this.out = null;
  +        this.resolver = null;
  +        this.source = null;
  +        this.parameters = null;
  +        this.objectModel = null;
       }
   }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to