01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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: */package org.apache.geronimo.connector;
17:
18: import org.apache.geronimo.gbean.AbstractName;
19: import org.apache.geronimo.gbean.GBeanInfo;
20: import org.apache.geronimo.gbean.GBeanInfoBuilder;
21: import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
22: import org.apache.geronimo.kernel.Kernel;
23: import org.apache.geronimo.management.geronimo.JCAAdminObject;
24:
25: /**
26: *
27: * @version $Revision: 550546 $
28: */
29: public class AdminObjectWrapperGBean {
30:
31: public static final GBeanInfo GBEAN_INFO;
32:
33: static {
34: GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(
35: AdminObjectWrapperGBean.class,
36: AdminObjectWrapper.class, NameFactory.JCA_ADMIN_OBJECT);
37: infoBuilder.addAttribute("adminObjectInterface", String.class,
38: true);
39: infoBuilder
40: .addAttribute("adminObjectClass", String.class, true);
41: infoBuilder.addAttribute("kernel", Kernel.class, false);
42: infoBuilder.addAttribute("abstractName", AbstractName.class,
43: false);
44: infoBuilder.addAttribute("objectName", String.class, false);
45: infoBuilder.addAttribute("classLoader", ClassLoader.class,
46: false);
47:
48: infoBuilder.addOperation("$getResource");
49: infoBuilder.addInterface(JCAAdminObject.class);
50:
51: infoBuilder.setConstructor(new String[] {
52: "adminObjectInterface", "adminObjectClass", "kernel",
53: "abstractName", "objectName", "classLoader" });
54:
55: GBEAN_INFO = infoBuilder.getBeanInfo();
56: }
57:
58: public static GBeanInfo getGBeanInfo() {
59: return GBEAN_INFO;
60: }
61:
62: }
|