org.apache.cocoon.bean.helpers
Class OutputStreamListener

java.lang.Object
  extended by org.apache.cocoon.bean.helpers.OutputStreamListener
All Implemented Interfaces:
BeanListener

public class OutputStreamListener
extends Object
implements BeanListener

Command line entry point. Parses command line, create Cocoon bean and invokes it with file destination.

Version:
CVS $Id: OutputStreamListener.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Upayavira

Constructor Summary
OutputStreamListener(OutputStream os)
           
 
Method Summary
 void brokenLinkFound(String uri, String parentURI, String message, Throwable t)
          Report a broken link
 void complete()
          Signals completion of the generation process.
 boolean isSuccessful()
           
 void messageGenerated(String msg)
          Report a general message about operation of the bean
 void pageGenerated(String sourceURI, String destinationURI, int pageSize, int linksInPage, int newLinksInPage, int pagesRemaining, int pagesComplete, long timeTaken)
          Report a page as successfully generated
 void pageSkipped(String uri, String message)
          Report a that was skipped because its URI matched an include/exclude pattern.
 void setReportFile(String filename)
           
 void setReportType(String type)
           
 void warningGenerated(String uri, String warning)
          Report a warning about something non-fatal that happened within the bean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputStreamListener

public OutputStreamListener(OutputStream os)
Method Detail

setReportFile

public void setReportFile(String filename)

setReportType

public void setReportType(String type)

pageGenerated

public void pageGenerated(String sourceURI,
                          String destinationURI,
                          int pageSize,
                          int linksInPage,
                          int newLinksInPage,
                          int pagesRemaining,
                          int pagesComplete,
                          long timeTaken)
Description copied from interface: BeanListener
Report a page as successfully generated

Specified by:
pageGenerated in interface BeanListener
linksInPage - Number of links found in this page
pagesRemaining - Number of pages still to be generated

messageGenerated

public void messageGenerated(String msg)
Description copied from interface: BeanListener
Report a general message about operation of the bean

Specified by:
messageGenerated in interface BeanListener
Parameters:
msg - The message to be reported

warningGenerated

public void warningGenerated(String uri,
                             String warning)
Description copied from interface: BeanListener
Report a warning about something non-fatal that happened within the bean.

Specified by:
warningGenerated in interface BeanListener
Parameters:
uri - The page being generated when warning was triggered
warning - The warning to be reported

brokenLinkFound

public void brokenLinkFound(String uri,
                            String parentURI,
                            String message,
                            Throwable t)
Description copied from interface: BeanListener
Report a broken link

Specified by:
brokenLinkFound in interface BeanListener
Parameters:
uri - The URI that failed to be generated
message - A reason why the link was not generated

pageSkipped

public void pageSkipped(String uri,
                        String message)
Description copied from interface: BeanListener
Report a that was skipped because its URI matched an include/exclude pattern.

Specified by:
pageSkipped in interface BeanListener

complete

public void complete()
Description copied from interface: BeanListener
Signals completion of the generation process. This method can be used to write out reports, display time generation duration, etc.

Specified by:
complete in interface BeanListener

isSuccessful

public boolean isSuccessful()


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.