View Javadoc

1   package com.googlecode.t7mp;
2   
3   import com.google.common.base.Objects;
4   
5   /**
6    * Holds configuration for a single instance.
7    * 
8    * 
9    * @author Joerg Bellmann
10   *
11   */
12  class InstanceConfiguration {
13  
14      private int id;
15      private int httpPort;
16      private int shutdownPort;
17      private String catalinaBasePath;
18  
19      public InstanceConfiguration(int id, int httpPort, int shutdownPort, String catalinaBasePath) {
20          this.id = id;
21          this.httpPort = httpPort;
22          this.shutdownPort = shutdownPort;
23          this.catalinaBasePath = catalinaBasePath;
24      }
25  
26      public int getHttpPort() {
27          return httpPort;
28      }
29  
30      public int getShutdownPort() {
31          return shutdownPort;
32      }
33  
34      public String getCatalinaBasePath() {
35          return catalinaBasePath;
36      }
37  
38      public int getId() {
39          return id;
40      }
41  
42      public String toString() {
43          return Objects.toStringHelper(this).add("id", getId()).add("httpPort", getHttpPort()).add("shutdownPort", getShutdownPort())
44                  .add("catalinaBasePath", getCatalinaBasePath()).toString();
45      }
46  
47  }