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.corba;
17:
18: import java.net.InetSocketAddress;
19:
20: import javax.ejb.spi.HandleDelegate;
21:
22: import org.apache.geronimo.gbean.AbstractName;
23: import org.apache.geronimo.gbean.GBeanInfo;
24: import org.apache.geronimo.gbean.GBeanInfoBuilder;
25: import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
26: import org.apache.geronimo.corba.security.config.ConfigAdapter;
27: import org.apache.geronimo.corba.security.config.ssl.SSLConfig;
28: import org.apache.geronimo.corba.security.config.tss.TSSConfig;
29: import org.apache.geronimo.openejb.OpenEjbSystem;
30: import org.omg.CORBA.ORB;
31: import org.omg.PortableServer.POA;
32:
33: /**
34: * @version $Revision$ $Date$
35: */
36: public final class CORBABeanGBean {
37:
38: public static final GBeanInfo GBEAN_INFO;
39:
40: static {
41: GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(
42: CORBABeanGBean.class, "OpenEJB ORB Adapter",
43: CORBABean.class, NameFactory.CORBA_SERVICE);
44:
45: infoBuilder.addAttribute("abstractName", AbstractName.class,
46: false);
47: infoBuilder.addAttribute("host", String.class, true);
48: infoBuilder.addAttribute("port", int.class, true);
49: infoBuilder.addAttribute("tssConfig", TSSConfig.class, true);
50:
51: infoBuilder.addAttribute("listenAddress",
52: InetSocketAddress.class, false);
53: infoBuilder.addAttribute("ORB", ORB.class, false);
54: infoBuilder.addAttribute("rootPOA", POA.class, false);
55:
56: infoBuilder.addAttribute("handleDelegate",
57: HandleDelegate.class, false);
58:
59: infoBuilder.addAttribute("classLoader", ClassLoader.class,
60: false);
61:
62: infoBuilder.addReference("ConfigAdapter", ConfigAdapter.class,
63: NameFactory.ORB_CONFIG);
64: infoBuilder.addReference("SSLConfig", SSLConfig.class,
65: NameFactory.CORBA_SSL);
66: infoBuilder.addReference("NameService", NameService.class,
67: NameFactory.CORBA_NAME_SERVICE);
68: infoBuilder.addReference("OpenEjbSystem", OpenEjbSystem.class);
69:
70: infoBuilder.setConstructor(new String[] { "abstractName",
71: "ConfigAdapter", "host", "port", "classLoader",
72: "NameService", "OpenEjbSystem", "SSLConfig" });
73:
74: GBEAN_INFO = infoBuilder.getBeanInfo();
75: }
76:
77: public static GBeanInfo getGBeanInfo() {
78: return GBEAN_INFO;
79: }
80: }
|