KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > geronimo > connector > AdminObjectWrapperGBean


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

17
18 package org.apache.geronimo.connector;
19
20 import org.apache.geronimo.gbean.GBeanInfo;
21 import org.apache.geronimo.gbean.GBeanInfoBuilder;
22 import org.apache.geronimo.gbean.AbstractName;
23 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
24 import org.apache.geronimo.kernel.Kernel;
25 import org.apache.geronimo.management.geronimo.JCAAdminObject;
26
27 /**
28  *
29  * @version $Revision: 486195 $
30  */

31 public class AdminObjectWrapperGBean {
32
33     public static final GBeanInfo GBEAN_INFO;
34
35     static {
36         GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(AdminObjectWrapperGBean.class, AdminObjectWrapper.class, NameFactory.JCA_ADMIN_OBJECT);
37         infoBuilder.addAttribute("adminObjectInterface", String JavaDoc.class, true);
38         infoBuilder.addAttribute("adminObjectClass", String JavaDoc.class, true);
39         infoBuilder.addAttribute("kernel", Kernel.class, false);
40         infoBuilder.addAttribute("abstractName", AbstractName.class, false);
41         infoBuilder.addAttribute("objectName", String JavaDoc.class, false);
42         infoBuilder.addAttribute("classLoader", ClassLoader JavaDoc.class, false);
43
44         infoBuilder.addOperation("$getResource");
45         infoBuilder.addInterface(JCAAdminObject.class);
46
47         infoBuilder.setConstructor(new String JavaDoc[]{
48             "adminObjectInterface",
49             "adminObjectClass",
50             "kernel",
51             "abstractName",
52             "objectName",
53             "classLoader"
54         });
55
56         GBEAN_INFO = infoBuilder.getBeanInfo();
57     }
58
59     public static GBeanInfo getGBeanInfo() {
60         return GBEAN_INFO;
61     }
62
63 }
64
Popular Tags