<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mbean PUBLIC
   "-//JBoss//DTD JBOSS XMBEAN 1.0//EN"
   "http://www.jboss.org/j2ee/dtd/jboss_xmbean_1_0.dtd">

<mbean>
   <description>The JNDIMap XMBean Example Version 1</description>

   <descriptors>
      <persistence persistPolicy="Never"
         persistPeriod="10"
         persistLocation="data/JNDIMap.data"
         persistName="JNDIMap"/>
      <currencyTimeLimit value="10"/>
      <state-action-on-update value="keep-running"/>
   </descriptors>

   <class>org.jboss.test.jmx.xmbean.JNDIMap</class>

   <constructor>
      <description>The default constructor</description>
      <name>JNDIMap</name>
   </constructor>

   <!-- Attributes -->
   <attribute access="read-write" getMethod="getJndiName" setMethod="setJndiName">
      <description>The location in JNDI where the Map we manage will be bound</description>
      <name>JndiName</name>
      <type>java.lang.String</type>
      <descriptors>
         <default value="inmemory/maps/MapTest" />
      </descriptors>
   </attribute>
   <attribute access="read-write" getMethod="getInitialValues" setMethod="setInitialValues">
      <description>The array of initial values that will be placed into
      the map associated with the service. The array is a collection of
      key,value pairs with elements[0,2,4,...2n] being the keys and
      elements [1,3,5,...,2n+1] the associated values</description>
      <name>InitialValues</name>
      <type>[Ljava.lang.String;</type>
      <descriptors>
         <default value="key0,value0" />
      </descriptors>
   </attribute>

   <!-- Operations -->
   <operation>
      <description>The start lifecycle operation</description>
      <name>start</name>
   </operation>
   <operation>
      <description>The stop lifecycle operation</description>
      <name>stop</name>
   </operation>
   <operation impact="ACTION">
      <description>Put a value into the nap</description>
      <name>put</name>
      <parameter>
         <description>The key the value will be store under</description>
         <name>key</name>
         <type>java.lang.Object</type>
      </parameter>
      <parameter>
         <description>The value to place into the map</description>
         <name>value</name>
         <type>java.lang.Object</type>
      </parameter>
   </operation>
   <operation impact="INFO">
      <description>Get a value from the map</description>
      <name>get</name>
      <parameter>
         <description>The key to lookup in the map</description>
         <name>get</name>
         <type>java.lang.Object</type>
      </parameter>
      <return-type>java.lang.Object</return-type>
   </operation>

   <!-- Notifications -->
   <notification>
      <description>The notification sent whenever a value is get into the map
         managed by the service</description>
      <name>javax.management.Notification</name>
      <notification-type>org.jboss.book.jmx.xmbean.JNDIMap.get</notification-type>
   </notification>
   <notification>
      <description>The notification sent whenever a value is put into the map
         managed by the service</description>
      <name>javax.management.Notification</name>
      <notification-type>org.jboss.book.jmx.xmbean.JNDIMap.put</notification-type>
   </notification>
</mbean>
