Apache Main | Avalon Main | Up |
Management Guide - XDoclet TaggingIntroductionDoclet tags inserted into source code automatically generate the mxinfo file. There are a number of advantages to doing it this way:
Any class or interface can be used to produce MXINFO files. How they get used is up to container and its Management subsystem. The TagsThe following tags are defined: phoenix:mx-topic
Example: /** * This is the interface via which you can manager * the root container of Applications. * * @phoenix:mx-topic name="Kernel" * * @author Peter Donald */ phoenix:mx-attribute
Example: /** * Gets the list of applications running in the container * * @phoenix:mx-attribute * * @return applicationNames The array of application names */ String[] getApplicationNames(); phoenix:mx-operation
Example: /** * Removes the application from the container * * @phoenix:mx-operation * * @param name the name of application to remove */ void removeApplication( String name ) phoenix:mx-description
Example: /** * Retrieve a string identifying version of server. * Usually looks like "v4.0.1a". * * @phoenix:mx-attribute * @phoenix:mx-description Retrieve a string identifying version of server. * * @return version string of server. */ String getVersion(); phoenix:mx-proxy
Example: /** * Ftp server starting point. Avalon framework will load this * from the jar file. This is also the starting point of remote * admin. * * @phoenix:block * @phoenix:service name="org.apache.avalon.ftpserver.interfaces.FtpServerInterface" * * @phoenix:mx-proxy class="org.apache.avalon.ftpserver.FtpServerMxProxy" * * @author Rana Bhattacharyya <rana_b@yahoo.com> * @author Paul Hammant <Paul_Hammant@yahoo.com> * @version 1.0 */ Build InstructionsTo have mxinfo files generated as part as your ant build script, include a task like that this: <!-- Make .mxinfo automatically for blocks --> <target name="phoenix-qdox" depends="compile"> <mkdir dir="${build.qdox}"/> <taskdef name="generatemeta" classname="org.apache.avalon.phoenix.tools.metagenerate.MetaGenerateTask"> <classpath refid="project.class.path" /> </taskdef> <generatemeta dest="${build.qdox}"> <fileset dir="${java.dir}"> <include name="**/*.java"/> </fileset> </generatemeta> </target> Where build.qdox is where the .mxinfo files should be placed, and java.dir is the location of the source files. The qdox jar and phoenix-client.jar need to be in the project.class.path. |