View Javadoc

1   package org.apache.geronimo.jetty;
2   
3   import org.apache.geronimo.gbean.GBeanInfo;
4   import org.apache.geronimo.gbean.GBeanInfoBuilder;
5   
6   /**
7    * Host gbean for jetty containing an array of hosts and virtual hosts
8    */
9   public class Host {
10  
11      private final String[] hosts;
12      private final String[] virtualHosts;
13  
14      public Host() {
15          hosts = null;
16          virtualHosts = null;
17      }
18  
19      public Host(String[] hosts, String[] virtualHosts) {
20          this.hosts = hosts;
21          this.virtualHosts = virtualHosts;
22      }
23  
24      public String[] getHosts() {
25          return hosts;
26      }
27  
28      public String[] getVirtualHosts() {
29          return virtualHosts;
30      }
31  
32      public static final GBeanInfo GBEAN_INFO;
33  
34      static {
35          GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(Host.class, "Host");
36          infoBuilder.addAttribute("hosts", String[].class, true);
37          infoBuilder.addAttribute("virtualHosts", String[].class, true);
38          infoBuilder.setConstructor(new String[] {"hosts", "virtualHosts"});
39          GBEAN_INFO = infoBuilder.getBeanInfo();
40      }
41  
42      public static GBeanInfo getGBeanInfo() {
43          return GBEAN_INFO;
44      }
45  }