org.apache.cocoon.generation
Class StatusGenerator

java.lang.Object
  extended byorg.apache.cocoon.util.AbstractLogEnabled
      extended byorg.apache.cocoon.xml.AbstractXMLProducer
          extended byorg.apache.cocoon.generation.AbstractGenerator
              extended byorg.apache.cocoon.generation.ServiceableGenerator
                  extended byorg.apache.cocoon.generation.StatusGenerator
All Implemented Interfaces:
Configurable, Contextualizable, Disposable, org.apache.cocoon.generation.Generator, Poolable, Recyclable, Serviceable, org.apache.cocoon.sitemap.SitemapModelComponent, org.apache.cocoon.xml.XMLProducer

public class StatusGenerator
extends org.apache.cocoon.generation.ServiceableGenerator
implements Contextualizable, Configurable

Generates an XML representation of the current status of Cocoon.

Potted DTD: <!ELEMENT statusinfo (group|value)*> <!ATTLIST statusinfo date CDATA #IMPLIED host CDATA #IMPLIED cocoon-version CDATA #IMPLIED > <!ELEMENT group (group|value)*> <!ATTLIST group name CDATA #IMPLIED > <!ELEMENT value (line)+> <!ATTLIST value name CDATA #REQUIRED <!ELEMENT line (#PCDATA)+> >

Version:
$Id: StatusGenerator.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
protected  Context context
          The component context.
static String NAMESPACE
          The XML namespace for the output document.
protected  org.apache.cocoon.configuration.Settings settings
          The settings.
protected  StoreJanitor storeJanitor
          The StoreJanitor used to get cache statistics
protected  Store storePersistent
          The persistent store
protected static String XLINK_NS
          The XML namespace for xlink
protected static String XLINK_PREFIX
          The namespace prefix for xlink namespace
 
Fields inherited from class org.apache.cocoon.generation.ServiceableGenerator
manager
 
Fields inherited from class org.apache.cocoon.generation.AbstractGenerator
objectModel, parameters, resolver, source
 
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
 
Fields inherited from interface org.apache.cocoon.generation.Generator
ROLE
 
Constructor Summary
StatusGenerator()
           
 
Method Summary
 void configure(Configuration configuration)
           
 void contextualize(Context avalonContext)
           
 void dispose()
           
 void generate()
          Generate the status information in XML format.
 void service(ServiceManager serviceManager)
          Set the current ServiceManager instance used by this Serviceable.
 void setup(org.apache.cocoon.environment.SourceResolver resolver, Map objectModel, String src, Parameters par)
           
 
Methods inherited from class org.apache.cocoon.generation.AbstractGenerator
recycle
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandler
 
Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled
getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
 

Field Detail

NAMESPACE

public static final String NAMESPACE
The XML namespace for the output document.

See Also:
Constant Field Values

XLINK_NS

protected static final String XLINK_NS
The XML namespace for xlink

See Also:
Constant Field Values

XLINK_PREFIX

protected static final String XLINK_PREFIX
The namespace prefix for xlink namespace

See Also:
Constant Field Values

context

protected Context context
The component context.


settings

protected org.apache.cocoon.configuration.Settings settings
The settings.


storeJanitor

protected StoreJanitor storeJanitor
The StoreJanitor used to get cache statistics


storePersistent

protected Store storePersistent
The persistent store

Constructor Detail

StatusGenerator

public StatusGenerator()
Method Detail

contextualize

public void contextualize(Context avalonContext)
                   throws ContextException
Specified by:
contextualize in interface Contextualizable
Throws:
ContextException
See Also:
Contextualizable.contextualize(org.apache.avalon.framework.context.Context)

configure

public void configure(Configuration configuration)
               throws ConfigurationException
Specified by:
configure in interface Configurable
Throws:
ConfigurationException
See Also:
Configurable.configure(org.apache.avalon.framework.configuration.Configuration)

service

public void service(ServiceManager serviceManager)
             throws ServiceException
Set the current ServiceManager instance used by this Serviceable. Need to get statistics about cache hits

Specified by:
service in interface Serviceable
Throws:
ServiceException

setup

public void setup(org.apache.cocoon.environment.SourceResolver resolver,
                  Map objectModel,
                  String src,
                  Parameters par)
           throws org.apache.cocoon.ProcessingException,
                  SAXException,
                  IOException
Specified by:
setup in interface org.apache.cocoon.sitemap.SitemapModelComponent
Throws:
org.apache.cocoon.ProcessingException
SAXException
IOException

dispose

public void dispose()
Specified by:
dispose in interface Disposable
See Also:
Disposable.dispose()

generate

public void generate()
              throws SAXException,
                     org.apache.cocoon.ProcessingException
Generate the status information in XML format.

Specified by:
generate in interface org.apache.cocoon.generation.Generator
Throws:
SAXException - when there is a problem creating the output SAX events.
org.apache.cocoon.ProcessingException


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.