apache > cocoon
 

Status Generator

Status Generator

The status generator creates xml from the current status of cocoon.

The information is surrounded by the root element statusinfo and grouped with the elements group and value.

The statusinfo element has the attributes host and date.

A group collects several informations about one topic. The topic is set by the attribute name of the group. A group can have subgroups (element group) or values.

Each value has a name specified by the attribute name and can consist of one or several line.

All elements have the namespace http://apache.org/cocoon/status/2.0.

  • Name : status
  • Class: org.apache.cocoon.generation.StatusGenerator
  • Cacheable: no.
     
  <map:generate type="status"/>
     

DTD

XML generated by status generator uses namespace http://apache.org/cocoon/status/2.0. The DTD of XML generated by status generator:

<!ELEMENT statusinfo (group|value)*>

<!ATTLIST statusinfo
   date CDATA #IMPLIED
   host CDATA #IMPLIED
>

<!ELEMENT group (group|value)*>
<!ATTLIST group
   name CDATA #IMPLIED
>

<!ELEMENT value (line)+>
<!ATTLIST value
   name CDATA #REQUIRED

<!ELEMENT line (#PCDATA)+>

Example

The current status generator outputs information about the jvm:

     
<?xml version="1.0" encoding="UTF-8"?>
<statusinfo date="16.07.2001 16:46:20" host="myhost" 
            xmlns="http://apache.org/cocoon/status/2.0" 
            xmlns:xlink="http://www.w3.org/1999/xlink">
  <group name="vm">
    <group name="memory">
      <value name="total"><line>11788288</line></value>
      <value name="free"><line>2778208</line></value>
    </group>
    <group name="jre">
      <value name="version"><line>1.3.0</line></value>
      <value type="simple" href="http://java.sun.com/" name="java-vendor">
        <line>Sun Microsystems Inc.</line>
      </value>
    </group>
    <group name="operating-system">
      <value name="name"><line>Windows 2000</line></value>
      <value name="architecture"><line>x86</line></value>
      <value name="version"><line>5.0</line></value>
    </group>
    <value name="classpath">
      <line>classes</line>
      <line>lib\ant.jar</line>
      <line>lib\jasper.jar</line>
    </value>
  </group>
</statusinfo>