User: d_jencks Date: 02/02/28 09:22:29 Added: core/samples/src/java/test/jmx JBossXMLExample.java Log: example for jboss xmbean xml descriptor task Revision Changes Path 1.1 xdoclet/core/samples/src/java/test/jmx/JBossXMLExample.java Index: JBossXMLExample.java =================================================================== /* * JBoss, the OpenSource J2EE webOS * * Distributable under LGPL license. * See terms of license at gnu.org. */ package test.jmx; /** * JBossXMLExample.java * * * Created: Sun Feb 17 23:10:04 2002 * * @author <a href="mailto:[EMAIL PROTECTED]">David Jencks</a> * @version * * @jmx:mbean description="sample for jboss xmbean.dtd" * persistPolicy="Never" * persistPeriod="10" * persistLocation="pl1" * persistName="JBossXMLExample1" * currencyTimeLimit="10" * descriptor="name=\"testdescriptor\" value=\"testvalue\"" * state-action-on-update="RESTART" * * * @jmx:notification description="first notification" * name="javax.management.SomeEvent" * notificationType="xd.example.first,xd.example.second" * persistPolicy="Never" * persistPeriod="20" * persistLocation="pl2" * persistName="JBossXMLExample2" * currencyTimeLimit="20" * * @jmx:notification description="second notification" * name="javax.management.SomeOtherEvent" * notificationType="xd.example.third,xd.example.fourth" */ public class JBossXMLExample { private String string; private Integer id; /** * Creates a new <code>JBossXMLExample</code> instance. * * @jmx:managed-constructor * @jmx:managed-constructor description="default constructor" */ public JBossXMLExample () { } /** * Creates a new <code>JBossXMLExample</code> instance. * * @param string a <code>String</code> value * @param id an <code>Integer</code> value * @jmx:managed-constructor */ public JBossXMLExample (String string, Integer id) { this.string = string; this.id = id; } /** * Get the String value. * @return the String value. * @jmx:managed-attribute description="string attribute" access="READ" * persistPolicy="Never" * persistPeriod="30" * currencyTimeLimit="30" */ public String getString() { return string; } /** * Set the String value. * @param newString The new String value. * @jmx:managed-attribute */ public void setString(String newString) { this.string = newString; } /** * Get the Id value. * @return the Id value. */ public Integer getId() { return id; } /** * Set the Id value. * @param newId The new Id value. * @jmx:managed-attribute description="id attribute" access="WRITE" * persistPolicy="Never" * persistPeriod="40" * currencyTimeLimit="40" */ public void setId(Integer newId) { this.id = newId; } Integer value; /** * Get the Value value. * @return the Value value. * @jmx:managed-attribute description="id attribute" access="READ_WRITE" * persistPolicy="Never" * persistPeriod="50" * currencyTimeLimit="50" * state-action-on-update="KEEP_RUNNING" */ public Integer getValue() { return value; } /** * Set the Value value. * @param newValue The new Value value. */ public void setValue(Integer newValue) { this.value = newValue; } /** * Does something. * * @param p1 a <code>String</code> value * @param p2 an <code>Integer</code> value * @jmx:managed-operation description="operation with 2 arguments" impact="INFO" */ public String doSomething(String p1, Integer p2) { return p1 + p2; } }// JBossXMLExample
_______________________________________________ Xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel
