KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > management > model > AdminObjectResourceMdl


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /*
25  * AdminObjectResource.java
26  *
27  * Created on August 26, 2002, 3:58 PM
28  */

29
30 package com.sun.enterprise.management.model;
31
32 import java.util.Set JavaDoc;
33 import java.util.Iterator JavaDoc;
34 import javax.management.ObjectName JavaDoc;
35
36 public class AdminObjectResourceMdl extends J2EEResourceMdl {
37
38     private static String JavaDoc MANAGED_OBJECT_TYPE = "AdminObjectResource";
39     /** Creates new AdminObjectResource */
40     String JavaDoc resourceAdapter = null;
41     String JavaDoc resType = null;
42     String JavaDoc[] propNames = null;
43     String JavaDoc[] propValues = null;
44                         
45     public AdminObjectResourceMdl(String JavaDoc name, String JavaDoc raName, String JavaDoc resType,
46                             String JavaDoc[] propNames, String JavaDoc[] propValues) {
47         super(name);
48         resourceAdapter = raName;
49         this.resType = resType;
50         this.propNames = propNames;
51         this.propValues = propValues;
52     }
53     public AdminObjectResourceMdl(String JavaDoc name, String JavaDoc serverName, String JavaDoc raName, String JavaDoc resType,
54                             String JavaDoc[] propNames, String JavaDoc[] propValues) {
55         super(name, serverName);
56         resourceAdapter = raName;
57         this.resType = resType;
58         this.propNames = propNames;
59         this.propValues = propValues;
60     }
61     
62     /**
63      * The type of the J2EEManagedObject as specified by JSR77. The class that implements a specific type must override this
64      * method and return the appropriate type string.
65      */

66     public String JavaDoc getj2eeType() {
67         return MANAGED_OBJECT_TYPE;
68     }
69     /*
70     public String[] getconnectionFactories(){
71         Set s = findNames("j2eeType=JCAConnectionFactory,J2EEServer="+ this.getJ2EEServer() + ",JCAResource=" + getname());
72         Iterator it = s.iterator();
73         String [] ret = new String[s.size()];
74         int i =0;
75         while(it.hasNext()) {
76             ret[i++] = ((ObjectName)it.next()).toString();
77         }
78         return ret;
79     }
80      */

81     
82     public String JavaDoc getresourceAdapter() {
83         return resourceAdapter;
84     }
85  
86     public String JavaDoc getresType() {
87         return resType;
88     }
89     public String JavaDoc[] getpropNames() {
90         return propNames;
91     }
92
93     public String JavaDoc[] getpropValues() {
94         return propValues;
95     }
96 }
97
Popular Tags