de.miethxml.hawron.cocoon.impl
Class ReuseableCocoonBean

java.lang.Object
  extended byCocoonWrapper
      extended byde.miethxml.hawron.cocoon.impl.ReuseableCocoonBean

public class ReuseableCocoonBean
extends CocoonWrapper

Author:
simon
See Also:
Serialized Form

Constructor Summary
ReuseableCocoonBean()
           
 
Method Summary
 void addExcludePattern(java.lang.String pattern)
           
 void addIncludeLinkExtension(java.lang.String extension)
           
 void addIncludePattern(java.lang.String pattern)
           
 void addListener(BeanListener listener)
           
 boolean confirmExtensions()
           
 void dispose()
           
protected  void finalize()
           
 boolean followLinks()
           
 long getLastModified(Target target)
           
static java.lang.String getProlog()
          Print a description of the software before running
 ModifiableSource getSource(Target target)
           
 int getTargetCount()
           
 void initialize()
           
 void interruptProcessing()
           You can interrupt the processing (only the process(Crawler crawler)) from a controlling Thread, but note CocoonBean is not threadsafe.
 boolean isPrecompileOnly()
           
 void pageGenerated(java.lang.String sourceURI, java.lang.String destURI, int pageSize, int linksInPage, int newLinksInPage, int pagesRemaining, int pagesComplete, long timeTaken)
           
 void pageSkipped(java.lang.String uri, java.lang.String message)
           
 void process(Task task, java.lang.String logger)
           
 void releaseSource(Source source)
           
 void sendBrokenLinkWarning(java.lang.String uri, java.lang.String warning)
           
 void sendComplete()
           
 void sendMessage(java.lang.String msg)
           
 void sendWarning(java.lang.String uri, java.lang.String warning)
           
 void setBrokenLinkExtension(java.lang.String brokenLinkExtension)
           
 void setBrokenLinkGenerate(boolean brokenLinkGenerate)
           
 void setChecksumURI(java.lang.String uri)
           
 void setConfirmExtensions(boolean confirmExtension)
           
 void setDefaultFilename(java.lang.String filename)
           
 void setFollowLinks(boolean follow)
           
 void setPrecompileOnly(boolean precompileOnly)
           
 void setVerbose(boolean verbose)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReuseableCocoonBean

public ReuseableCocoonBean()
Method Detail

initialize

public void initialize()
                throws java.lang.Exception
Throws:
java.lang.Exception

finalize

protected void finalize()
                 throws java.lang.Throwable
Throws:
java.lang.Throwable

setFollowLinks

public void setFollowLinks(boolean follow)

setConfirmExtensions

public void setConfirmExtensions(boolean confirmExtension)

setPrecompileOnly

public void setPrecompileOnly(boolean precompileOnly)

isPrecompileOnly

public boolean isPrecompileOnly()

setVerbose

public void setVerbose(boolean verbose)

setDefaultFilename

public void setDefaultFilename(java.lang.String filename)

setBrokenLinkGenerate

public void setBrokenLinkGenerate(boolean brokenLinkGenerate)

setBrokenLinkExtension

public void setBrokenLinkExtension(java.lang.String brokenLinkExtension)

setChecksumURI

public void setChecksumURI(java.lang.String uri)

followLinks

public boolean followLinks()

confirmExtensions

public boolean confirmExtensions()

getTargetCount

public int getTargetCount()

addExcludePattern

public void addExcludePattern(java.lang.String pattern)

addIncludePattern

public void addIncludePattern(java.lang.String pattern)

addIncludeLinkExtension

public void addIncludeLinkExtension(java.lang.String extension)

addListener

public void addListener(BeanListener listener)

pageGenerated

public void pageGenerated(java.lang.String sourceURI,
                          java.lang.String destURI,
                          int pageSize,
                          int linksInPage,
                          int newLinksInPage,
                          int pagesRemaining,
                          int pagesComplete,
                          long timeTaken)

sendMessage

public void sendMessage(java.lang.String msg)

sendWarning

public void sendWarning(java.lang.String uri,
                        java.lang.String warning)

sendBrokenLinkWarning

public void sendBrokenLinkWarning(java.lang.String uri,
                                  java.lang.String warning)

pageSkipped

public void pageSkipped(java.lang.String uri,
                        java.lang.String message)

dispose

public void dispose()

getSource

public ModifiableSource getSource(Target target)
                           throws java.io.IOException,
                                  ProcessingException
Throws:
java.io.IOException
ProcessingException

getLastModified

public long getLastModified(Target target)
                     throws java.io.IOException,
                            ProcessingException
Throws:
java.io.IOException
ProcessingException

releaseSource

public void releaseSource(Source source)

getProlog

public static java.lang.String getProlog()
Print a description of the software before running


process

public void process(Task task,
                    java.lang.String logger)
             throws java.lang.Exception
Throws:
java.lang.Exception

interruptProcessing

public void interruptProcessing()

You can interrupt the processing (only the process(Crawler crawler)) from a controlling Thread, but note CocoonBean is not threadsafe. Only the processing is interrupted not the initialization. After successfully interruption the CocoonBean will send the "complete"-Event to the BeanListeners, so you have to capture this.


sendComplete

public void sendComplete()