1 package org.andromda.core.configuration;
2
3 import java.io.Serializable;
4 import org.apache.commons.lang.StringUtils;
5
6
7
8
9
10
11
12 public class Server
13 implements Serializable
14 {
15 private static final long serialVersionUID = 34L;
16
17
18
19
20 private int port;
21
22
23
24
25
26
27 public int getPort()
28 {
29 return port;
30 }
31
32
33
34
35
36
37 public void setPort(final String port)
38 {
39 if (StringUtils.isNotBlank(port))
40 {
41 this.port = Integer.parseInt(port);
42 }
43 }
44
45
46
47
48 private String host;
49
50
51
52
53
54
55 public String getHost()
56 {
57 return host;
58 }
59
60
61
62
63
64
65 public void setHost(String host)
66 {
67 this.host = host;
68 }
69
70
71
72
73
74 private int loadInterval = 1000;
75
76
77
78
79
80
81
82 public int getLoadInterval()
83 {
84 return loadInterval;
85 }
86
87
88
89
90
91
92
93 public void setLoadInterval(final String loadInterval)
94 {
95 if (StringUtils.isNotBlank(loadInterval))
96 {
97 this.loadInterval = Integer.parseInt(loadInterval);
98 }
99 }
100
101
102
103
104
105 private int maximumFailedLoadAttempts = 10;
106
107
108
109
110
111
112
113 public int getMaximumFailedLoadAttempts()
114 {
115 return this.maximumFailedLoadAttempts;
116 }
117
118
119
120
121
122
123
124 public void setMaximumFailedLoadAttempts(final String maximumFailedLoadAttempts)
125 {
126 if (StringUtils.isNotBlank(maximumFailedLoadAttempts))
127 {
128 this.maximumFailedLoadAttempts = Integer.parseInt(maximumFailedLoadAttempts);
129 }
130 }
131 }