cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/serialization FOPSerializer.java
Date Wed, 21 Mar 2001 09:58:13 GMT
cziegeler    01/03/21 01:58:12

  Modified:    src/org/apache/cocoon/serialization Tag: xml-cocoon2
                        FOPSerializer.java
  Added:       lib      Tag: xml-cocoon2 fop-0_17_0.jar
  Removed:     lib      Tag: xml-cocoon2 fop-0_16_0.jar
  Log:
  Updated to latest fop and fixed component handling for FOP serializer
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +4286 -0   xml-cocoon/lib/Attic/fop-0_17_0.jar
  
  	<<Binary file>>
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.14  +16 -9     xml-cocoon/src/org/apache/cocoon/serialization/Attic/FOPSerializer.java
  
  Index: FOPSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/serialization/Attic/FOPSerializer.java,v
  retrieving revision 1.1.2.13
  retrieving revision 1.1.2.14
  diff -u -r1.1.2.13 -r1.1.2.14
  --- FOPSerializer.java	2001/02/22 17:10:42	1.1.2.13
  +++ FOPSerializer.java	2001/03/21 09:58:10	1.1.2.14
  @@ -12,7 +12,7 @@
   import java.io.OutputStream;
   import java.io.PrintWriter;
   
  -import org.apache.avalon.Poolable;
  +import org.apache.avalon.Recyclable;
   import org.apache.fop.apps.Driver;
   import org.apache.fop.apps.FOPException;
   import org.apache.fop.apps.Version;
  @@ -29,15 +29,15 @@
    * @author <a href="mailto:giacomo.pati@pwr.ch">Giacomo Pati</a>
    *         (PWR Organisation &amp; Entwicklung)
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.1.2.13 $ $Date: 2001/02/22 17:10:42 $
  + * @version CVS $Revision: 1.1.2.14 $ $Date: 2001/03/21 09:58:10 $
    *
    */
  -public class FOPSerializer extends AbstractSerializer implements MessageListener, Poolable
{
  +public class FOPSerializer extends AbstractSerializer implements MessageListener, Recyclable
{
   
       /**
        * The FOP driver
        */
  -    private Driver driver = null;
  +    private Driver driver;
   
       /**
        * Create the FOP driver
  @@ -67,17 +67,14 @@
       public void endDocument() throws SAXException {
           super.endDocument();
           try {
  -            driver.format();
  -            driver.render();
  +            this.driver.format();
  +            this.driver.render();
           } catch (IOException e) {
               getLogger().error("FOPSerializer.endDocument()", e);
               throw new SAXException (e);
           } catch (FOPException e) {
               getLogger().error("FOPSerializer.endDocument()", e);
               throw new SAXException (e);
  -        } finally {
  -            driver = null;
  -            MessageHandler.removeListener(this);
           }
       }
   
  @@ -96,4 +93,14 @@
           // we should consume the events in some meaningful way
           // for example formatting them on the metapipeline
       }
  +    
  +    /**
  +     * Recycle the component and remove it from the MessageList
  +     */
  +    public void recycle() {
  +        super.recycle();
  +        MessageHandler.removeListener(this);
  +        this.driver = null;
  +    }
  +
   }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message