001 /** 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 package org.apache.geronimo.jetty6; 018 019 import org.apache.geronimo.gbean.GBeanInfo; 020 import org.apache.geronimo.gbean.GBeanInfoBuilder; 021 022 /** 023 * Host gbean for jetty6 containing an array of hosts and virtual hosts 024 */ 025 public class Host { 026 027 private final String[] hosts; 028 private final String[] virtualHosts; 029 030 public Host() { 031 hosts = null; 032 virtualHosts = null; 033 } 034 035 public Host(String[] hosts, String[] virtualHosts) { 036 this.hosts = hosts; 037 this.virtualHosts = virtualHosts; 038 } 039 040 public String[] getHosts() { 041 return hosts; 042 } 043 044 public String[] getVirtualHosts() { 045 return virtualHosts; 046 } 047 048 public static final GBeanInfo GBEAN_INFO; 049 050 static { 051 GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(Host.class, "Host"); 052 infoBuilder.addAttribute("hosts", String[].class, true); 053 infoBuilder.addAttribute("virtualHosts", String[].class, true); 054 infoBuilder.setConstructor(new String[] {"hosts", "virtualHosts"}); 055 GBEAN_INFO = infoBuilder.getBeanInfo(); 056 } 057 058 public static GBeanInfo getGBeanInfo() { 059 return GBEAN_INFO; 060 } 061 }