001 package org.apache.geronimo.jetty; 002 003 import org.apache.geronimo.gbean.GBeanInfo; 004 import org.apache.geronimo.gbean.GBeanInfoBuilder; 005 006 /** 007 * Host gbean for jetty containing an array of hosts and virtual hosts 008 */ 009 public class Host { 010 011 private final String[] hosts; 012 private final String[] virtualHosts; 013 014 public Host() { 015 hosts = null; 016 virtualHosts = null; 017 } 018 019 public Host(String[] hosts, String[] virtualHosts) { 020 this.hosts = hosts; 021 this.virtualHosts = virtualHosts; 022 } 023 024 public String[] getHosts() { 025 return hosts; 026 } 027 028 public String[] getVirtualHosts() { 029 return virtualHosts; 030 } 031 032 public static final GBeanInfo GBEAN_INFO; 033 034 static { 035 GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(Host.class, "Host"); 036 infoBuilder.addAttribute("hosts", String[].class, true); 037 infoBuilder.addAttribute("virtualHosts", String[].class, true); 038 infoBuilder.setConstructor(new String[] {"hosts", "virtualHosts"}); 039 GBEAN_INFO = infoBuilder.getBeanInfo(); 040 } 041 042 public static GBeanInfo getGBeanInfo() { 043 return GBEAN_INFO; 044 } 045 }