1 /**
2 *
3 * Copyright 2005 The Apache Software Foundation
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * 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: 396206 $
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.class, true);
38 infoBuilder.addAttribute("adminObjectClass", String.class, true);
39 infoBuilder.addAttribute("kernel", Kernel.class, false);
40 infoBuilder.addAttribute("abstractName", AbstractName.class, false);
41 infoBuilder.addAttribute("objectName", String.class, false);
42 infoBuilder.addAttribute("classLoader", ClassLoader.class, false);
43
44 infoBuilder.addOperation("$getResource");
45 infoBuilder.addInterface(JCAAdminObject.class);
46
47 infoBuilder.setConstructor(new String[]{
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 }