KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mx4j > tools > adaptor > http > ProcessorMBeanDescription


1 /*
2  * Copyright (C) The MX4J Contributors.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the MX4J License version 1.0.
6  * See the terms of the MX4J License in the documentation provided with this software.
7  */

8
9 package mx4j.tools.adaptor.http;
10
11 import java.lang.reflect.Method JavaDoc;
12
13 import mx4j.MBeanDescriptionAdapter;
14
15 /**
16  * Description of the ProcessorMBean interface
17  *
18  * @version $Revision: 1.3 $
19  */

20 public class ProcessorMBeanDescription extends MBeanDescriptionAdapter
21 {
22    public String JavaDoc getAttributeDescription(String JavaDoc attribute)
23    {
24       if (attribute.equals("Name"))
25       {
26          return "Name of the ProcessorMBean";
27       }
28       return super.getAttributeDescription(attribute);
29    }
30
31    public String JavaDoc getOperationDescription(Method JavaDoc operation)
32    {
33       if (operation.getName().equals("writeResponse"))
34       {
35          return "The method process a xml result document into a suitable response";
36       }
37       if (operation.getName().equals("writeError"))
38       {
39          return "The method process a xml error into a suitable response";
40       }
41       if (operation.getName().equals("preProcess"))
42       {
43          return "Processes paths allowing for the replacement of a certain path with another";
44       }
45       if (operation.getName().equals("notFoundElement"))
46       {
47          return "Method invoked when a path is not found";
48       }
49       return super.getOperationDescription(operation);
50    }
51 }
52
Popular Tags