XML File Example





XML File Example

File: apachembeans.xml 

<?xml version="1.0"?>
<!DOCTYPE mbeans-descriptors PUBLIC
     "-//Apache Software Foundation//DTD Model MBeans Configuration File"
     "http://jakarta.apache.org/commons/dtds/mbeans-descriptors.dtd">
<mbeans-descriptors>
<mbean
     name="ApacheServer"
     description="ModelMBean for managing an Apache Web Server"
     type="jnjmx.ch4.ApacheServer"
     >
<attribute
     name="BusyWorkers"
     description="Apache Server Busy Workers"
     type="int"
     readable="true"
     writeable="false"
     is="false"
     getMethod="getBusyWorkers"
     displayName="Apache BusyWorkers"
     >
     <descriptor>
         <field name="displayName" value="Apache BusyWorkers"/>
         <field name="currencyTimeLimit" value="3"/>
         <field name="name" value="BusyWorkers"/>
         <field name="getMethod" value="getBusyWorkers"/>
         <field name="descriptorType" value="attribute"/>
     </descriptor>
</attribute>
<attribute
     name="BytesPerSec"
     description="Apache Server Bytes Per Sec"
     type="int"
     readable="true"
     writeable="false"
     is="false"
     getMethod="getBytesPerSec"
     displayName="Apache BytesPerSec"
     >
     <descriptor>
         <field name="displayName" value="Apache BytesPerSec"/>
         <field name="currencyTimeLimit" value="10"/>
         <field name="name" value="BytesPerSec"/>
         <field name="getMethod" value="getBytesPerSec"/>
         <field name="descriptorType" value="attribute"/>
     </descriptor>
</attribute>
<attribute
     name="BytesPerReq"
     description="Apache Server Bytes Per Request"
     type="int"
     readable="true"
     writeable="false"
     is="false"
     getMethod="getBytesPerReq"
     displayName="Apache BytesPerReq"
     >
     <descriptor>
         <field name="displayName" value="Apache BytesPerReq"/>
         <field name="currencyTimeLimit" value="10"/>
         <field name="name" value="BytesPerReq"/>
         <field name="getMethod" value="getBytesPerReq"/>
         <field name="descriptorType" value="attribute"/>
     </descriptor>
</attribute>
<attribute
     name="IdleWorkers"
     description="Apache Server Idle Workers"
     type="int"
     readable="true"
     writeable="false"
     is="false"
     getMethod="getIdleWorkers"
     displayName="Apache IdleWorkers"
     >
     <descriptor>
         <field name="displayName" value="Apache IdleWorkers"/>
         <field name="currencyTimeLimit" value="10"/>
         <field name="name" value="IdleWorkers"/>
         <field name="getMethod" value="getIdleWorkers"/>
         <field name="descriptorType" value="attribute"/>
     </descriptor>
</attribute>
<attribute
     name="ReqPerSec"
     description="Apache Server Requests Per Second"
     type="float"
     readable="true"
     writeable="false"
     is="false"
     getMethod="getReqPerSec"
     displayName="Apache ReqPerSec"
     >
     <descriptor>
         <field name="displayName" value="Apache ReqPerSec"/>
         <field name="currencyTimeLimit" value="5"/>
         <field name="name" value="ReqPerSec"/>
         <field name="getMethod" value="getReqPerSec"/>
         <field name="descriptorType" value="attribute"/>
     </descriptor>
</attribute>
<attribute
     name="Scoreboard"
     description="Apache Server Scoreboard"
     type="java.lang.String"
     readable="true"
     writeable="false"
     is="false"
     getMethod="getScoreboard"
     displayName="Apache Scoreboard"
     >
     <descriptor>
         <field name="displayName" value="Apache Scoreboard"/>
         <field name="currencyTimeLimit" value="10"/>
         <field name="name" value="Scoreboard"/>
         <field name="getMethod" value="getScoreboard"/>
         <field name="descriptorType" value="attribute"/>
     </descriptor>
</attribute>
<attribute
     name="TotalAccesses"
     description="Apache Server total accesses"
     type="int"
     readable="true"
     writeable="false"
     is="false"
     getMethod="getTotalAccesses"
     displayName="Apache TotalAccesses"
     >
     <descriptor>
         <field name="displayName" value="Apache TotalAccesses"/>
         <field name="currencyTimeLimit" value="-1"/>
         <field name="name" value="TotalAccesses"/>
         <field name="getMethod" value="getTotalAccesses"/>
         <field name="descriptorType" value="attribute"/>
     </descriptor>
</attribute>
<attribute
     name="TotalKBytes"
     description="Apache Server total KiloBytes"
     type="long"
     readable="true"
     writeable="false"
     is="false"
     getMethod="getTotalKBytes"
     displayName="Apache TotalKBytes"
     >
     <descriptor>
         <field name="displayName" value="Apache TotalKBytes"/>
         <field name="currencyTimeLimit" value="-1"/>
         <field name="name" value="TotalKBytes"/>
         <field name="getMethod" value="getTotalKBytes"/>
         <field name="descriptorType" value="attribute"/>
     </descriptor>
</attribute>
<attribute
     name="Uptime"
     description="Apache Server Up Time"
     type="long"
     readable="true"
     writeable="false"
     is="false"
     getMethod="getUptime"
     displayName="Apache Uptime"
     >
     <descriptor>
         <field name="displayName" value="Apache Uptime"/>
         <field name="currencyTimeLimit" value="10"/>
         <field name="name" value="Uptime"/>
         <field name="getMethod" value="getUptime"/>
         <field name="descriptorType" value="attribute"/>
     </descriptor>
</attribute>
<attribute
     name="CpuLoad"
     description="Apache Server CPU Load"
     type="float"
     readable="true"
     writeable="false"
     is="false"
     getMethod="getCpuLoad"
     displayName="Apache Uptime"
     >
     <descriptor>
         <field name="displayName" value="Apache Uptime"/>
         <field name="currencyTimeLimit" value="10"/>
         <field name="name" value="CpuLoad"/>
         <field name="getMethod" value="getCpuLoad"/>
         <field name="descriptorType" value="attribute"/>
     </descriptor>
</attribute>
<attribute
     name="State"
     description="Apache Server state"
     type="java.lang.String"
     readable="true"
     writeable="false"
     is="false"
     getMethod="getState"
     displayName="Apache State"
     >
     <descriptor>
         <field name="displayName" value="Apache State"/>
         <field name="currencyTimeLimit" value="10"/>
         <field name="name" value="State"/>
         <field name="getMethod" value="getState"/>
         <field name="descriptorType" value="attribute"/>
     </descriptor>
</attribute>
<attribute
     name="Server"
     description="Apache Server Busy Workers"
     type="java.lang.String"
     readable="true"
     writeable="true"
     is="false"
     getMethod="getServer"
     setMethod="setServer"
     displayName="Apache Server URL"
     >
     <descriptor>
         <field name="setMethod" value="setServer"/>
         <field name="displayName" value="Apache Server URL"/>
         <field name="currencyTimeLimit" value="10"/>
         <field name="name" value="Server"/>
         <field name="getMethod" value="getServer"/>
         <field name="descriptorType" value="attribute"/>
     </descriptor>
</attribute>
<constructor
     name="jnjmx.ch4.ApacheServer"
     >
     <parameter name="apacheURL"
         description="URL of Apache Server to Manage"
         type="java.lang.String"/>
     <descriptor>
         <field name="name" value="jnjmx.ch4.ApacheServer"/>
         <field name="descriptorType" value="operation"/>
         <field name="role" value="constructor"/>
     </descriptor>
</constructor>

<notification
     name="jmx.ModelMBean.General"
     description="Apache Server Down"
     >
     <notification-type>
     jmx.ModelMBean.General.Apache.Down
     </notification-type>
     <descriptor>
         <field name="name" value="jmx.ModelMBean.General"/>
         <field name="severity" value="6"/>
         <field name="descriptorType" value="notification"/>
     </descriptor>
</notification>

<operation
     name="getValue"
     description="getValue(): get an apache status field"
     returnType="java.lang.String"
     impact="2"
     >
     <parameter name="FieldName"
         description="Apache status field name"
         type="java.lang.String"/>
     <descriptor>
         <field name="name" value="getValue"/>

         <field name="class" value="ApacheServer"/>
         <field name="descriptorType" value="operation"/>
         <field name="role" value="operation"/>
     </descriptor>
</operation>
<operation
     name="getState"
     description="getState(): current status of apache server"
     returnType="java.lang.String"
     impact="2"
     >
     <descriptor>
         <field name="name" value="getState"/>
         <field name="class" value="ApacheServer"/>
         <field name="descriptorType" value="operation"/>
         <field name="role" value="operation"/>
     </descriptor>
</operation>
<operation
     name="getServer"
     description="getServer(): URL of apache server"
     returnType="java.lang.Integer"
     impact="2"
     >
     <descriptor>
         <field name="name" value="getServer"/>
         <field name="class" value="ApacheServer"/>
         <field name="descriptorType" value="operation"/>
         <field name="role" value="operation"/>
     </descriptor>
</operation>
<operation
     name="setServer"
     description="getServer(): URL of apache server"
     returnType="java.lang.String"
     impact="1"
     >
     <parameter name="url" description="Apache Server URL"
         type="java.lang.String"/>
     <descriptor>
         <field name="name" value="setServer"/>
         <field name="descriptorType" value="operation"/>
         <field name="class" value="ApacheServer"/>
         <field name="role" value="operation"/>
     </descriptor>
</operation>

<operation
     name="start"
     description="start(): start apache server"
     returnType="java.lang.Integer"
     impact="1"
     >
     <descriptor>
         <field name="name" value="start"/>
         <field name="class" value="ApacheServer"/>
         <field name="descriptorType" value="operation"/>
         <field name="role" value="operation"/>
     </descriptor>
</operation>
<operation
     name="stop"
     description="stop(): start apache server"
     returnType="java.lang.Integer"
     impact="1"
     >
     <descriptor>
         <field name="name" value="stop"/>
         <field name="class" value="ApacheServer"/>
         <field name="descriptorType" value="operation"/>
         <field name="role" value="operation"/>
     </descriptor>
</operation>
<operation
     name="getBusyWorkers"
     description="number of busy threads"
     returnType="int"
     impact="2"
     >
     <descriptor>
         <field name="name" value="getBusyWorkers"/>
         <field name="class" value="ApacheServer"/>
         <field name="descriptorType" value="operation"/>
         <field name="role" value="operation"/>
     </descriptor>
</operation>
<operation
     name="getBytesPerSec"
     description="number of bytes per second processed"
     returnType="int"
     impact="2"
     >
     <descriptor>
         <field name="name" value="getBytesPerSec"/>
         <field name="class" value="ApacheServer"/>
         <field name="descriptorType" value="operation"/>
         <field name="role" value="operation"/>
     </descriptor>
</operation>
<operation
     name="getBytesPerReq"
     description="number of bytes per request processed"
     returnType="int"
     impact="2"
     >
     <descriptor>
         <field name="name" value="getBytesPerReq"/>
         <field name="class" value="ApacheServer"/>
         <field name="descriptorType" value="operation"/>
         <field name="role" value="operation"/>
     </descriptor>
</operation>
<operation
     name="getCpuLoad"
     description="current load of cpu"
     returnType="float"
     impact="2"
     >
     <descriptor>
         <field name="name" value="getCpuLoad"/>
         <field name="class" value="ApacheServer"/>
         <field name="descriptorType" value="operation"/>
         <field name="role" value="operation"/>
     </descriptor>
</operation>
<operation
     name="getIdleWorkers"
     description="number of idle threads"
     returnType="int"
     impact="2"
     >
     <descriptor>
         <field name="name" value="getIdleWorkers"/>
         <field name="class" value="ApacheServer"/>
         <field name="descriptorType" value="operation"/>
         <field name="role" value="operation"/>
     </descriptor>
</operation>
<operation
     name="getReqPerSec"
     description="number of bytes per second processed"
     returnType="int"
     impact="2"
     >
     <descriptor>
         <field name="name" value="getReqPerSec"/>
         <field name="descriptorType" value="operation"/>
          <field name="class" value="ApacheServer"/>
         <field name="role" value="operation"/>
     </descriptor>
</operation>
<operation
     name="getScoreboard"
     description="gets apache scoreboard "
     returnType="java.lang.String"
     impact="2"
     >
     <descriptor>
         <field name="name" value="getScoreboard"/>
         <field name="class" value="ApacheServer"/>
         <field name="descriptorType" value="operation"/>
         <field name="role" value="operation"/>
     </descriptor>
</operation>
<operation
     name="getTotalAccesses"
     description="number of bytes per second processed"
     returnType="int"
     impact="2"
     >
     <descriptor>
         <field name="name" value="getTotalAccesses"/>
         <field name="class" value="ApacheServer"/>
         <field name="descriptorType" value="operation"/>
         <field name="role" value="operation"/>
     </descriptor>
</operation>
<operation
     name="getTotalKBytes"
     description="number of Kilo bytes processed"
     returnType="long"
     impact="2"
     >

     <descriptor>
         <field name="name" value="getTotalKBytes"/>
         <field name="class" value="ApacheServer"/>
         <field name="descriptorType" value="operation"/>
         <field name="role" value="operation"/>
     </descriptor>
</operation>
<operation
     name="getUptime"
     description="number of bytes per second processed"
     returnType="long"
     impact="2"
     >
     <descriptor>
         <field name="name" value="getUptime"/>
         <field name="class" value="ApacheServer"/>
         <field name="descriptorType" value="operation"/>
         <field name="role" value="operation"/>
     </descriptor>
</operation>
<operation
     name="getCpuLoad"
     description="number CPU Load"
     returnType="float"
     impact="2"
     >
     <descriptor>
         <field name="name" value="getCpuLoad"/>
         <field name="class" value="ApacheServer"/>
         <field name="descriptorType" value="operation"/>
         <field name="role" value="operation"/>
     </descriptor>
</operation>
<descriptor>
  <field name="descriptorType" value="mbean"/>
  <field name="logfile" value="jmxmain.log"/>
  <field name="name" value="ApacheServer"/>
  <field name="visibility" value="1"/>
  <field name="log" value="true"/>
  <field name="currencyTimeLimit" value="10"/>
  <field name="type" value="jnjmx.ch4.Apacheerver"/>
  <field name="export" value="false"/>
  <field name="displayName" value="ApacheServerManager"/>
  <field name="persistPolicy" value="Never"/>
</descriptor>

     Python   SQL   Java   php   Perl 
     game development   web development   internet   *nix   graphics   hardware 
     telecommunications   C++ 
     Flash   Active Directory   Windows