KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jmanage > testapp > mbeans > ObjectNameDataTypeTest


1 /**
2  * Copyright 2004-2005 jManage.org
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.jmanage.testapp.mbeans;
17
18 import javax.management.ObjectName JavaDoc;
19 import javax.management.MalformedObjectNameException JavaDoc;
20
21 /**
22  *
23  * Date: Jul 31, 2005
24  * @author Rakesh Kalra
25  */

26 public class ObjectNameDataTypeTest implements ObjectNameDataTypeTestMBean {
27
28     private ObjectName JavaDoc objectName;
29
30     public ObjectNameDataTypeTest(){
31         try {
32             objectName = new ObjectName JavaDoc("domain:name=abc");
33         } catch (MalformedObjectNameException JavaDoc e) {
34             assert false;
35         }
36     }
37
38     public ObjectName JavaDoc getObjectName() {
39         return objectName;
40     }
41
42     public void setObjectName(ObjectName JavaDoc objectName) {
43         this.objectName = objectName;
44     }
45
46     public String JavaDoc objectNameToString(ObjectName JavaDoc objectName) {
47         return objectName.toString();
48     }
49 }
50
Popular Tags