1 16 package org.apache.cocoon.generation; 17 18 import java.io.IOException ; 19 20 import org.apache.cocoon.ProcessingException; 21 import org.apache.cocoon.generation.FileGenerator; 22 import org.xml.sax.SAXException ; 23 24 34 public class PauseGenerator 35 extends FileGenerator { 36 37 38 public void generate() 39 throws IOException , SAXException , ProcessingException { 40 long secs = this.parameters.getParameterAsLong("pause", 60); 41 this.getLogger().debug("Waiting for " + secs + " secs."); 42 try { 43 Thread.sleep(secs * 1000); 44 } catch (InterruptedException ie) { 45 } 46 this.getLogger().debug("Finished waiting."); 47 super.generate(); 48 } 49 50 } 51 | Popular Tags |