KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > webjmx > adapter > xml > ServiceMapping


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

8 /*
9  * ServiceMapping.java
10  *
11  * Created on December 22, 2001, 5:28 PM
12  */

13
14 package org.webjmx.adapter.xml;
15
16 import org.webjmx.adapter.*;
17
18 /**
19  *
20  * @author john
21  * @version
22  */

23 public class ServiceMapping
24 {
25     /** Holds value of property name. */
26     private String JavaDoc name;
27     
28     /** Holds value of property className. */
29     private String JavaDoc className;
30     
31     /** Creates new ServiceMapping */
32     public ServiceMapping() {
33     }
34
35     /** Getter for property name.
36      * @return Value of property name.
37      */

38     public String JavaDoc getName()
39     {
40         return name;
41     }
42     
43     /** Setter for property name.
44      * @param name New value of property name.
45      */

46     public void setName(String JavaDoc name)
47     {
48         this.name = name;
49     }
50     
51     /** Getter for property className.
52      * @return Value of property className.
53      */

54     public String JavaDoc getClassName()
55     {
56         return className;
57     }
58     
59     /** Setter for property className.
60      * @param className New value of property className.
61      */

62     public void setClassName(String JavaDoc className)
63     {
64         this.className = className;
65     }
66     
67     public void verify()
68         throws ClassCastException JavaDoc, ClassNotFoundException JavaDoc, InstantiationException JavaDoc, IllegalAccessException JavaDoc
69     {
70         Class JavaDoc cls = Class.forName(className);
71         JMXServiceAdapter adaptor = (JMXServiceAdapter)cls.newInstance();
72     }
73     
74     public String JavaDoc toString()
75     {
76         return "ServiceMapping[ " +name +", " +className +"]";
77     }
78 }
79
Popular Tags