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 org.apache.geronimo.gbean.GBeanInfo;
19: import org.apache.geronimo.gbean.GBeanInfoBuilder;
20: import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
21: import org.apache.geronimo.system.serverinfo.ServerInfo;
22:
23: import org.apache.geronimo.corba.security.config.ConfigAdapter;
24:
25: import java.net.InetSocketAddress;
26:
27: /**
28: * @version $Revision: 465108 $ $Date: 2006-10-17 17:23:40 -0700 (Tue, 17 Oct 2006) $
29: */
30: public final class NameServiceGBean {
31:
32: public static final GBeanInfo GBEAN_INFO;
33:
34: static {
35: GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(
36: NameServiceGBean.class, "CORBA Naming Service",
37: NameService.class, NameFactory.CORBA_NAME_SERVICE);
38:
39: infoFactory.addReference("ServerInfo", ServerInfo.class,
40: NameFactory.GERONIMO_SERVICE);
41: infoFactory.addReference("ConfigAdapter", ConfigAdapter.class,
42: NameFactory.ORB_CONFIG);
43: infoFactory.addAttribute("host", String.class, true);
44: infoFactory.addAttribute("port", int.class, true);
45: infoFactory.addAttribute("address", InetSocketAddress.class,
46: false);
47: infoFactory.addAttribute("local", boolean.class, true);
48: infoFactory.setConstructor(new String[] { "ServerInfo",
49: "ConfigAdapter", "host", "port" });
50:
51: GBEAN_INFO = infoFactory.getBeanInfo();
52: }
53:
54: public static GBeanInfo getGBeanInfo() {
55: return GBEAN_INFO;
56: }
57: }
|